commit b41e2368a5b61a40e89ce18fa27376b01caee7b1
parent a8efc1b874096ed049026c954222a59389687e65
Author: Simon Kornblith <simon@simonster.com>
Date: Tue, 9 Oct 2012 18:29:21 -0400
Update for https://bugzilla.mozilla.org/show_bug.cgi?id=794602
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js
@@ -344,7 +344,11 @@ Zotero.Attachments = new function(){
var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"]
.createInstance(Components.interfaces.nsIURL);
nsIURL.spec = url;
- wbp.saveURI(nsIURL, null, null, null, null, file);
+ try {
+ wbp.saveURI(nsIURL, null, null, null, null, file);
+ } catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
+ wbp.saveURI(nsIURL, null, null, null, null, file, null);
+ }
if(callback) callback(attachmentItem);