зеркало из https://github.com/mozilla/gecko-dev.git
Bug 333277: null description in helper version info leaves Download Actions blank, patch by Phil Ringnalda <philringnalda@gmail.com>, r=mscott
This commit is contained in:
Родитель
c0ba53e08e
Коммит
52a458a0eb
|
@ -249,15 +249,20 @@ var gDownloadActionsWindow = {
|
|||
_getDisplayNameForFile: function (aFile)
|
||||
{
|
||||
#ifdef XP_WIN
|
||||
if (aFile instanceof Components.interfaces.nsILocalFileWin)
|
||||
if (aFile instanceof Components.interfaces.nsILocalFileWin) {
|
||||
try {
|
||||
return aFile.getVersionInfoField("FileDescription");
|
||||
#else
|
||||
}
|
||||
catch (e) {
|
||||
// fall through to the filename
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// XXXben - Read the bundle name on OS X.
|
||||
var ios = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
var url = ios.newFileURI(aFile).QueryInterface(Components.interfaces.nsIURL);
|
||||
return url.fileName;
|
||||
#endif
|
||||
},
|
||||
|
||||
_loadMIMERegistryData: function ()
|
||||
|
|
Загрузка…
Ссылка в новой задаче