From 9b9fe098d9446762cc650a9a730e4b44ce6812e3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 17 Jun 2018 18:08:33 -0400 Subject: [PATCH] Fix display of error on corrupted DB --- chrome/content/zotero/xpcom/db.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index b3886b6226..417be5d484 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -1217,7 +1217,7 @@ Zotero.DBConnection.prototype._getConnectionAsync = async function (options) { // Save damaged filed this._debug('Saving damaged DB file with .damaged extension', 1); let damagedFile = this._dbPath + '.damaged'; - Zotero.moveToUnique(file, damagedFile); + await Zotero.File.moveToUnique(file, damagedFile); // Create new main database this._connection = store.openDatabase(file); @@ -1237,7 +1237,7 @@ Zotero.DBConnection.prototype._getConnectionAsync = async function (options) { // Save damaged file this._debug('Saving damaged DB file with .damaged extension', 1); let damagedFile = this._dbPath + '.damaged'; - Zotero.moveToUnique(file, damagedFile); + await Zotero.File.moveToUnique(file, damagedFile); // Test the backup file try {