From 1ffc34a8ac479dde348a360798c8de76b905607a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 16 Aug 2018 05:21:00 -0400 Subject: [PATCH] Don't try to retrieve PDFs when importing from a file --- chrome/content/zotero/xpcom/translation/translate_item.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 67d33ffefc..21831df6a8 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -197,7 +197,8 @@ Zotero.Translate.ItemSaver.prototype = { // // TODO: Separate pref? var openAccessPDFURLs = new Map(); - if (Zotero.Prefs.get('downloadAssociatedFiles') + if (this.attachmentMode == Zotero.Translate.ItemSaver.ATTACHMENT_MODE_DOWNLOAD + && Zotero.Prefs.get('downloadAssociatedFiles') // TEMP: Limit to dev builds && Zotero.isDevBuild) { for (let item of items) { @@ -252,7 +253,8 @@ Zotero.Translate.ItemSaver.prototype = { // If a translated PDF attachment wasn't saved successfully, either because there wasn't // one or there was but it failed, look for another PDF (if enabled) - if (Zotero.Prefs.get('downloadAssociatedFiles') + if (this.attachmentMode == Zotero.Translate.ItemSaver.ATTACHMENT_MODE_DOWNLOAD + && Zotero.Prefs.get('downloadAssociatedFiles') // TEMP: Limit to dev builds && Zotero.isDevBuild) { for (let item of items) {