mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 20:20:00 +00:00
Bug 303675 downloads fail silently if the default download path is invalid, e.g. leads to a removed drive
p=me r=cbiesinger sr=neil.parkwaycc.co.uk a=asa
This commit is contained in:
parent
4b6f08e7a3
commit
9b7929c07a
@ -142,7 +142,7 @@ nsHelperAppDialog.prototype = {
|
||||
|
||||
var autoDownload = branch.getBoolPref("autoDownload");
|
||||
// If the autoDownload pref is set then just download to default download directory
|
||||
if (dir && autoDownload) {
|
||||
if (autoDownload && dir && dir.exists()) {
|
||||
if (aDefaultFile == "")
|
||||
aDefaultFile = bundle.GetStringFromName("noDefaultFile") + (aSuggestedFileExtension || "");
|
||||
dir.append(aDefaultFile);
|
||||
|
@ -503,7 +503,7 @@ function poseFilePicker(aFpP)
|
||||
} catch (e) { }
|
||||
|
||||
var autoDownload = branch.getBoolPref("autoDownload");
|
||||
if (dir && autoDownload) {
|
||||
if (autoDownload && dir && dir.exists()) {
|
||||
dir.append(getNormalizedLeafName(aFpP.fileInfo.fileName, aFpP.fileInfo.fileExt));
|
||||
aFpP.file = uniqueFile(dir);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user