From 4a8150203a4cd93849a5979ba9f7dbbcb7d94175 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 11 Nov 2006 19:17:16 +0000 Subject: [PATCH] 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) --- chrome/content/zotero/xpcom/fulltext.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index 9fdbeb236f..c54fd80206 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -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