From be3b245dbe5ea8937c5e48fca75a31088c48653e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 19 Jun 2022 19:03:41 -0400 Subject: [PATCH] Don't index PDF if `fulltext.textMaxLength` is 0 Follow-up to 13adfd131c --- chrome/content/zotero/xpcom/fulltext.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index ceeb4559da..f6ab7fff2c 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -514,6 +514,12 @@ Zotero.Fulltext = Zotero.FullText = new function(){ return false; } + var maxLength = Zotero.Prefs.get('fulltext.textMaxLength'); + if (!maxLength) { + Zotero.debug('fulltext.textMaxLength is 0 -- skipping indexing'); + return false; + } + if (contentType == 'application/pdf') { return this.indexPDF(path, item.id, complete); } @@ -523,12 +529,6 @@ Zotero.Fulltext = Zotero.FullText = new function(){ return false; } - var maxLength = Zotero.Prefs.get('fulltext.textMaxLength'); - if (!maxLength) { - Zotero.debug('fulltext.textMaxLength is 0 -- skipping indexing'); - return false; - } - Zotero.debug('Indexing file ' + path); var text;