зеркало из https://github.com/mozilla/pjs.git
Fix for 34362 -- make opening local files work again, by returning a URL, rather than a native path. r=pavlov, a=leaf.
This commit is contained in:
Родитель
e8adc0c8ba
Коммит
4702dd137a
|
@ -714,7 +714,12 @@ function RevealSearchPanel()
|
|||
fp.init(window, bundle.GetStringFromName("openFile"), nsIFilePicker.modeOpen);
|
||||
fp.setFilters(nsIFilePicker.filterAll);
|
||||
fp.show();
|
||||
openNewWindowWith(fp.file.path);
|
||||
|
||||
// Hack to get a file: url from an nsIFile
|
||||
var tempFileSpec = Components.classes["component://netscape/filespec"].createInstance(Components.interfaces.nsIFileSpec);
|
||||
tempFileSpec.nativePath = fp.file.path;
|
||||
|
||||
openNewWindowWith(tempFileSpec.URLString);
|
||||
} catch (ex) { }
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче