Fix for startup error when trying to rebuild the fulltext index with a text file that doesn't have a charset (which shouldn't happen, but apparently it can if there's some undetermined error in the attaching process)

This commit is contained in:
Dan Stillman 2006-11-11 19:17:16 +00:00
parent 8090e04318
commit 4a8150203a

View file

@ -179,7 +179,10 @@ Zotero.Fulltext = new function(){
return false;
}
if (!charset){ throw ('Charset not provided to indexFile()'); }
if (!charset){
Zotero.debug("Text file didn't have charset in indexFile()", 1);
return false;
}
var text = Zotero.File.getContents(file, charset);
// Split elements to avoid word concatentation