Fix error backing up database

Broken since f7e411d561. This affected automatic backups and DB
integrity check repairs (which do a backup first).
This commit is contained in:
Dan Stillman 2018-08-09 04:16:29 -04:00
parent 63d8d57f83
commit c45c9cc23b

View file

@ -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");