Skip to content

Commit

Permalink
Fix data directory migration if only Firefox profile directory
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Aug 19, 2017
1 parent bbfe4b9 commit d368c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/content/zotero/xpcom/dataDirectory.js
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit d368c40

Please sign in to comment.