fixes win32 crash and file->open regression resulting from patch for bug 24867, patch by neil r+sr=darin

This commit is contained in:
darin%meer.net 2004-04-19 21:41:28 +00:00
parent 5249125cc3
commit 0c93ce449f

View File

@ -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) {}
}