mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
fixes win32 crash and file->open regression resulting from patch for bug 24867, patch by neil r+sr=darin
This commit is contained in:
parent
5249125cc3
commit
0c93ce449f
@ -1209,18 +1209,16 @@ function selectFileToOpen(label, prefRoot)
|
||||
fp.filterIndex = index;
|
||||
|
||||
// use a pref to remember the displayDirectory selected by the user.
|
||||
var dir = null;
|
||||
try {
|
||||
dir = pref.getComplexValue(lastDirPref, Components.interfaces.nsILocalFile);
|
||||
fp.displayDirectory = pref.getComplexValue(lastDirPref, Components.interfaces.nsILocalFile);
|
||||
} catch (ex) {
|
||||
}
|
||||
fp.displayDirectory = dir;
|
||||
|
||||
if (fp.show() == nsIFilePicker.returnOK) {
|
||||
pref.setIntPref(filterIndexPref, fp.filterIndex);
|
||||
pref.setComplexValue(lastDirPref,
|
||||
Components.interfaces.nsILocalFile,
|
||||
fp.file.parent.QueryInterface(Components.interfaces.nsILocalFile));
|
||||
fp.file.parent);
|
||||
fileURL = fp.fileURL;
|
||||
}
|
||||
|
||||
@ -1230,7 +1228,7 @@ function selectFileToOpen(label, prefRoot)
|
||||
function BrowserOpenFileWindow()
|
||||
{
|
||||
try {
|
||||
openTopWin(selectFileToOpen("openFile", "browser.open."));
|
||||
openTopWin(selectFileToOpen("openFile", "browser.open.").spec);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user