Don't try to retrieve PDFs when importing from a file

This commit is contained in:
Dan Stillman 2018-08-16 05:21:00 -04:00
parent 6d5abb55f0
commit 1ffc34a8ac

View file

@ -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) {