Don't index PDF if fulltext.textMaxLength is 0

Follow-up to 13adfd131c
This commit is contained in:
Dan Stillman 2022-06-19 19:03:41 -04:00
parent df3e7a600e
commit be3b245dbe

View file

@ -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;