www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit bd7ff9c2c653c9d7b22b5add3065c4e4af767abc
parent b31e47c504ccf532505448161b175bac50e52186
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  1 Apr 2010 18:01:11 +0000

Fix upgrade error for custom styles with invalid ids


Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 14++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -2343,10 +2343,16 @@ Zotero.Schema = new function(){ if (!matches) { continue; } - file.append(matches[1]); - Zotero.debug("Extracting styles '" + matches[1] + "' from database"); - Zotero.File.putContents(file, row.csl); - Zotero.wait(); + try { + Zotero.debug("Extracting styles '" + matches[1] + "' from database"); + file.append(matches[1]); + Zotero.File.putContents(file, row.csl); + Zotero.wait(); + } + catch (e) { + Zotero.debug(e); + Components.utils.reportError("Skipping style '" + matches[1] + "'"); + } } Zotero.Styles.init(); }