diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index 8b6956998..22f086cc2 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -1057,23 +1057,13 @@ Zotero.DBConnection.prototype.backupDatabase = Zotero.Promise.coroutine(function var connection = storageService.openDatabase(Zotero.File.pathToFile(tmpFile)); } catch (e) { - this._debug("Database file '" + OS.Path.basename(tmpFile) + "' is corrupt -- skipping backup"); + Zotero.logError(e); + this._debug("Database file '" + OS.Path.basename(tmpFile) + "' can't be opened -- skipping backup"); if (yield OS.File.exists(tmpFile)) { yield OS.File.remove(tmpFile); } return false; } - finally { - let resolve; - connection.asyncClose({ - complete: function () { - resolve(); - } - }); - yield new Zotero.Promise(function () { - resolve = arguments[0]; - }); - } // Special backup if (!suffix && numBackups > 1) {