Skip to content

Commit

Permalink
Prompt to try manual data dir migration again if Firefox is open
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Dec 17, 2016
1 parent 6b0e3ac commit e34bf4d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions chrome/content/zotero/xpcom/dataDirectory.js
Expand Up @@ -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;
}
}
Expand Down
1 change: 1 addition & 0 deletions chrome/locale/en-US/zotero/zotero.properties
Expand Up @@ -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
Expand Down

0 comments on commit e34bf4d

Please sign in to comment.