commit e34bf4d5cbb794f12fbeb05f4316576283583c7a
parent 6b0e3ac2d27ce8c19f988bd75b62df68c5becb54
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 17 Dec 2016 07:42:03 -0500
Prompt to try manual data dir migration again if Firefox is open
Diffstat:
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js
@@ -506,6 +506,25 @@ Zotero.DataDirectory = {
let foundPipe = yield Zotero.IPC.pipeExists();
if (foundPipe) {
Zotero.debug("Found existing pipe -- skipping migration");
+
+ if (!automatic) {
+ let ps = Services.prompt;
+ let buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING)
+ + (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_IS_STRING);
+ let index = ps.confirmEx(null,
+ Zotero.getString('dataDir.migration.failure.title'),
+ Zotero.getString('dataDir.migration.failure.full.firefoxOpen'),
+ buttonFlags,
+ Zotero.getString('general.tryAgain'),
+ Zotero.getString('general.tryLater'),
+ null, null, {}
+ );
+
+ if (index == 0) {
+ return this.checkForMigration(newDir, newDir);
+ }
+ }
+
return false;
}
}
diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties
@@ -147,6 +147,7 @@ dataDir.migration.failure.full.automatic.text1 = %S attempted to move your data
dataDir.migration.failure.full.automatic.text2 = It is recommended that you close %S and move your data directory manually.
dataDir.migration.failure.full.manual.text1 = Your %S data directory could not be migrated.
dataDir.migration.failure.full.manual.text2 = It is recommended that you close %S and manually move your data directory to the new default location.
+dataDir.migration.failure.full.firefoxOpen = Your data directory cannot be migrated while Zotero for Firefox is open. Please close Firefox and try again.
dataDir.migration.failure.full.current = Current location: %S
dataDir.migration.failure.full.recommended = Recommended location: %S
dataDir.migration.failure.full.showCurrentDirectoryAndQuit = Show Current Directory and Quit