diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js index cd1c89ade8..07f7176d0e 100644 --- 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 index 1bca23f0ee..bb5f6fe1aa 100644 --- 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