From c45c9cc23bc195ec46372d9cc6642ef790f56902 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 9 Aug 2018 04:16:29 -0400 Subject: [PATCH] Fix error backing up database Broken since f7e411d561. This affected automatic backups and DB integrity check repairs (which do a backup first). --- chrome/content/zotero/xpcom/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index 417be5d484..58c8648d0f 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -1021,7 +1021,7 @@ Zotero.DBConnection.prototype.backupDatabase = Zotero.Promise.coroutine(function if (!suffix && !force) { let backupFile = this._dbPath + '.bak'; if (yield OS.File.exists(backupFile)) { - let currentDBTime = (yield OS.File.stat(file.path)).lastModificationDate; + let currentDBTime = (yield OS.File.stat(file)).lastModificationDate; let lastBackupTime = (yield OS.File.stat(backupFile)).lastModificationDate; if (currentDBTime == lastBackupTime) { Zotero.debug("Database '" + this._dbName + "' hasn't changed -- skipping backup");