From f5fb1fa806856c608bd2c33e8e6b6ec6f2e0206a Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 21 Dec 2008 18:16:31 +0000 Subject: [PATCH] don't download snapshots when snapshot is given as a document object and automaticSnapshots preference is false --- chrome/content/zotero/xpcom/translate.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js index 71ecf935d2..19d0507907 100644 --- a/chrome/content/zotero/xpcom/translate.js +++ b/chrome/content/zotero/xpcom/translate.js @@ -1410,10 +1410,12 @@ Zotero.Translate.prototype._itemDone = function(item, attachedTo) { // if snapshot is not explicitly set to false, retrieve snapshot if(attachment.document) { - try { - Zotero.Attachments.importFromDocument(attachment.document, myID, attachment.title); - } catch(e) { - Zotero.debug("Translate: Error attaching document", 2); + if(automaticSnapshots) { + try { + Zotero.Attachments.importFromDocument(attachment.document, myID, attachment.title); + } catch(e) { + Zotero.debug("Translate: Error attaching document", 2); + } } // Save attachment if snapshot pref enabled or not HTML // (in which case downloadAssociatedFiles applies)