From d368c4019a82cafffa312858a63affa6fdee93a6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 19 Aug 2017 15:58:42 +0200 Subject: [PATCH] Fix data directory migration if only Firefox profile directory --- chrome/content/zotero/xpcom/dataDirectory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js index 2a33acab2e..8126bf4bca 100644 --- a/chrome/content/zotero/xpcom/dataDirectory.js +++ b/chrome/content/zotero/xpcom/dataDirectory.js @@ -229,7 +229,7 @@ Zotero.DataDirectory = { let mtime = (yield OS.File.stat(dbFile)).lastModificationDate; Zotero.debug(`Database found at ${dbFile}, last modified ${mtime}`); // If custom location has a newer DB, use that - if (useProfile && mtime > profileSubdirModTime) { + if (!useProfile || mtime > profileSubdirModTime) { dataDir = nsIFile.path; useFirefoxProfileCustom = true; useProfile = false; @@ -254,7 +254,7 @@ Zotero.DataDirectory = { let mtime = (yield OS.File.stat(dbFile)).lastModificationDate; Zotero.debug(`Database found at ${dbFile}, last modified ${mtime}`); // If newer than Zotero profile directory, use this one - if (useProfile && mtime > profileSubdirModTime) { + if (!useProfile || mtime > profileSubdirModTime) { dataDir = dir; useFirefoxProfile = true; useProfile = false;