зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1258797 - Catch error when trying to open save as dialog to invalid path. r=Gijs
MozReview-Commit-ID: GbMgcfOgVaq --HG-- extra : rebase_source : da89a0b7d2c66e8c744395f874a6b5fc61516454
This commit is contained in:
Родитель
6b20a710cf
Коммит
88c31186c4
|
@ -143,9 +143,13 @@ DownloadLastDir.prototype = {
|
|||
let file = plainPrefFile;
|
||||
if (aReason == Components.interfaces.nsIContentPrefCallback2.COMPLETE_OK &&
|
||||
result instanceof Components.interfaces.nsIContentPref) {
|
||||
try {
|
||||
file = Components.classes["@mozilla.org/file/local;1"]
|
||||
.createInstance(Components.interfaces.nsIFile);
|
||||
file.initWithPath(result.value);
|
||||
} catch (e) {
|
||||
file = plainPrefFile;
|
||||
}
|
||||
}
|
||||
aCallback(file);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче