From 2353e73bf2206901c55b0860b7bfe806a5a5c881 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 8 Nov 2012 11:37:35 -0500 Subject: [PATCH] Save attachments that have snapshot=false when automaticSnapshots and downloadAssociatedFiles are false. This behavior might be confusing, but it's probably the best option given that links are usually important metadata. --- .../zotero/xpcom/translation/translate_item.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 4e3ab6d54..5828a751f 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -315,11 +315,13 @@ Zotero.Translate.ItemSaver.prototype = { Zotero.debug("Translate: Not adding attachment: no URL specified", 2); } else { // Determine whether to save an attachment - if(attachment.document - || (attachment.mimeType && attachment.mimeType == "text/html")) { - if(!Zotero.Prefs.get("automaticSnapshots")) return; - } else { - if(!Zotero.Prefs.get("downloadAssociatedFiles")) return; + if(attachment.snapshot !== false) { + if(attachment.document + || (attachment.mimeType && attachment.mimeType == "text/html")) { + if(!Zotero.Prefs.get("automaticSnapshots")) return; + } else { + if(!Zotero.Prefs.get("downloadAssociatedFiles")) return; + } } if(attachment.document && "__wrappedDOMObject" in attachment.document) {