Fix crash trying to save without a default download dir

This commit is contained in:
blakeross%telocity.com 2002-11-09 13:17:10 +00:00
Родитель b6b93d15a5
Коммит a93546ea5b
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -315,7 +315,7 @@ function Startup()
} }
} }
} }
return;
setTimeout(delayedStartup, 0); setTimeout(delayedStartup, 0);
} }

Просмотреть файл

@ -161,8 +161,9 @@ function foundHeaderInfo(aSniffer, aData, aSkipPrompt)
const nsILocalFile = Components.interfaces.nsILocalFile; const nsILocalFile = Components.interfaces.nsILocalFile;
const lfContractID = "@mozilla.org/file/local;1"; const lfContractID = "@mozilla.org/file/local;1";
var dir = null;
try { try {
var dir = prefs.getComplexValue("dir", nsILocalFile); dir = prefs.getComplexValue("dir", nsILocalFile);
} }
catch (e) { catch (e) {
} }
@ -179,7 +180,8 @@ function foundHeaderInfo(aSniffer, aData, aSkipPrompt)
appendFiltersForContentType(fp, contentType, appendFiltersForContentType(fp, contentType,
isDocument ? MODE_COMPLETE : MODE_FILEONLY); isDocument ? MODE_COMPLETE : MODE_FILEONLY);
fp.displayDirectory = dir; if (dir)
fp.displayDirectory = dir;
if (isDocument) { if (isDocument) {
try { try {