Fix error on missing files when searching full-text content
This commit is contained in:
parent
d7309ca64e
commit
0f5b277c91
|
@ -1267,13 +1267,13 @@ Zotero.Fulltext = Zotero.FullText = new function(){
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If that doesn't exist, check for the actual file
|
// If that doesn't exist, check for the actual file
|
||||||
let file = item.getFile();
|
let path = yield item.getFilePathAsync();
|
||||||
if (!file) {
|
if (!path) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Zotero.debug("Searching for text '" + searchText + "' in " + file.path);
|
Zotero.debug("Searching for text '" + searchText + "' in " + path);
|
||||||
content = yield Zotero.File.getContentsAsync(file, item.attachmentCharset);
|
content = yield Zotero.File.getContentsAsync(path, item.attachmentCharset);
|
||||||
|
|
||||||
// If HTML and not binary mode, convert to text
|
// If HTML and not binary mode, convert to text
|
||||||
if (mimeType == 'text/html' && !binaryMode) {
|
if (mimeType == 'text/html' && !binaryMode) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user