More saveURI fixes
This commit is contained in:
parent
b6fee9a357
commit
42215d0441
|
@ -1189,7 +1189,13 @@ function downloadPDFTool(tool, version, callback) {
|
|||
|
||||
wbp.progressListener = progressListener;
|
||||
Zotero.debug("Saving " + uri.spec + " to " + fileURL.spec);
|
||||
wbp.saveURI(uri, null, null, null, null, fileURL);
|
||||
try {
|
||||
wbp.saveURI(uri, null, null, null, null, fileURL);
|
||||
} catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=794602
|
||||
// XXX Always use when we no longer support Firefox < 18
|
||||
wbp.saveURI(uri, null, null, null, null, fileURL, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -463,7 +463,13 @@ Zotero.Sync.Storage.Session.WebDAV.prototype.downloadFile = function (request) {
|
|||
.createInstance(nsIWBP);
|
||||
wbp.persistFlags = nsIWBP.PERSIST_FLAGS_BYPASS_CACHE;
|
||||
wbp.progressListener = listener;
|
||||
wbp.saveURI(uri, null, null, null, null, destFile);
|
||||
try {
|
||||
wbp.saveURI(uri, null, null, null, null, destFile);
|
||||
} catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=794602
|
||||
// XXX Always use when we no longer support Firefox < 18
|
||||
wbp.saveURI(uri, null, null, null, null, destFile, null);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
request.error(e);
|
||||
|
|
|
@ -315,8 +315,14 @@ Zotero.Sync.Storage.Session.ZFS.prototype.downloadFile = function (request) {
|
|||
.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
|
||||
.createInstance(nsIWBP);
|
||||
wbp.persistFlags = nsIWBP.PERSIST_FLAGS_BYPASS_CACHE;
|
||||
wbp.progressListener = listener;
|
||||
wbp.saveURI(uri, null, null, null, null, destFile);
|
||||
wbp.progressListener = listener;
|
||||
try {
|
||||
wbp.saveURI(uri, null, null, null, null, destFile);
|
||||
} catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=794602
|
||||
// XXX Always use when we no longer support Firefox < 18
|
||||
wbp.saveURI(uri, null, null, null, null, destFile, null);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
self.onError(e);
|
||||
|
|
Loading…
Reference in New Issue
Block a user