commit 29194868183688da2c4fc98bc1d567e981bb98b7
parent f45d56113af3e0975581ce883feb43c680bf9d3a
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 19 Aug 2017 23:47:10 +0200
Don't keep checking for lost Z4Fx data directory
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js
@@ -550,7 +550,7 @@ Zotero.DataDirectory = {
checkForLostLegacy: async function () {
var currentDir = this.dir;
if (currentDir != this.defaultDir) return;
- if (Zotero.Prefs.get('ignoreLegacyDataDir')) return;
+ if (Zotero.Prefs.get('ignoreLegacyDataDir.auto') || Zotero.Prefs.get('ignoreLegacyDataDir.explicit')) return;
try {
let profilesParent = OS.Path.dirname(Zotero.Profile.getOtherAppProfilesDir());
Zotero.debug("Looking for Firefox profile in " + profilesParent);
@@ -578,16 +578,19 @@ Zotero.DataDirectory = {
let info = await OS.File.stat(dbFile);
if (info.size < 1200000) {
Zotero.debug(`Legacy database is ${info.size} bytes -- ignoring`);
+ Zotero.Prefs.set('ignoreLegacyDataDir.auto', true);
return;
}
mtime = info.lastModificationDate;
if (mtime < new Date(2017, 6, 1)) {
Zotero.debug(`Legacy database was last modified on ${mtime.toString()} -- ignoring`);
+ Zotero.Prefs.set('ignoreLegacyDataDir.auto', true);
return;
}
Zotero.debug(`Legacy database found at ${dbFile}, last modified ${mtime}`);
}
catch (e) {
+ Zotero.Prefs.set('ignoreLegacyDataDir.auto', true);
if (e.becauseNoSuchFile) {
return;
}
@@ -620,7 +623,7 @@ Zotero.DataDirectory = {
return;
}
if (dontAskAgain.value) {
- Zotero.Prefs.set('ignoreLegacyDataDir', true);
+ Zotero.Prefs.set('ignoreLegacyDataDir.explicit', true);
}
if (index == 0) {
return;