Workaround for indexing bug with bad UTF-8 past maxLength
I'll put in a better fix on master, though this shouldn't happen anyway, since nsIConverterInputStream shouldn't be throwing.
This commit is contained in:
parent
10cef4c06f
commit
83c391628d
|
@ -376,7 +376,14 @@ Zotero.Fulltext = new function(){
|
||||||
|
|
||||||
// Record number of characters indexed
|
// Record number of characters indexed
|
||||||
if (!isCacheFile) {
|
if (!isCacheFile) {
|
||||||
var totalChars = this.getTotalCharsFromFile(itemID);
|
try {
|
||||||
|
var totalChars = this.getTotalCharsFromFile(itemID);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
Zotero.debug(e);
|
||||||
|
Components.utils.reportError(e);
|
||||||
|
totalChars = 0;
|
||||||
|
}
|
||||||
if (maxLength) {
|
if (maxLength) {
|
||||||
var charsIndexed = Math.min(maxLength, totalChars);
|
var charsIndexed = Math.min(maxLength, totalChars);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user