diff --git a/chrome/chromeFiles/content/scholar/xpcom/db.js b/chrome/chromeFiles/content/scholar/xpcom/db.js index 00c315bb8..7a515e962 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/db.js +++ b/chrome/chromeFiles/content/scholar/xpcom/db.js @@ -361,6 +361,18 @@ Scholar.DB = new function(){ var file = Scholar.getScholarDatabase(); var backupFile = Scholar.getScholarDatabase('bak'); + // DEBUG: Temporary check + // Test the backup file (to make sure the backup mechanism is working) + if (backupFile.exists()){ + try { + _connection = store.openDatabase(backupFile); + } + catch (e){ + Scholar.debug('Backup file was corrupt', 1); + } + _connection = undefined; + } + catchBlock: try { _connection = store.openDatabase(file); }