www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 48636701046b182a2c47fbb97172be3e1446c0cd
parent 062ff185961e1f0da196172e93858d5b8c79c3bc
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 16 Nov 2016 01:07:26 -0500

Display "Migration in progress — do not interrupt…" during migration

Would be nice to have a determinate progress meter on Windows, but that
will require enumerating all files, which maybe would just make things
slower. Might be safer, though, by discouraging people from
force-quitting.

Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 8+++++++-
Mchrome/locale/en-US/zotero/zotero.properties | 1+
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -1466,9 +1466,15 @@ Components.utils.import("resource://gre/modules/osfile.jsm"); partial = true; } + // Not yet used + let progressHandler = function (progress, progressMax) { + this.updateZoteroPaneProgressMeter(Math.round(progress / progressMax)); + }.bind(this); + let errors; try { - errors = yield Zotero.migrateDataDirectory(oldDir, newDir, partial); + this.showZoteroPaneProgressMeter(Zotero.getString("dataDir.migration.inProgress")); + errors = yield Zotero.migrateDataDirectory(oldDir, newDir, partial, progressHandler); } catch (e) { // Complete failure (failed to create new directory, copy marker, or move database) diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties @@ -131,6 +131,7 @@ dataDir.selectedDirEmpty.useNewDir = Use the new directory? dataDir.moveFilesToNewLocation = Be sure to move files from your existing Zotero data directory to the new location before reopening %1$S. dataDir.incompatibleDbVersion.title = Incompatible Database Version dataDir.incompatibleDbVersion.text = The currently selected data directory is not compatible with Zotero Standalone, which can share a database only with Zotero for Firefox 2.1b3 or later.\n\nUpgrade to the latest version of Zotero for Firefox first or select a different data directory for use with Zotero Standalone. +dataDir.migration.inProgress = Migration in progress — do not interrupt… dataDir.migration.failure.title = Data Directory Migration Error dataDir.migration.failure.partial.text = Some files in your old %1$S data directory could not be transferred to the new location. You should close %2$S and attempt to move the remaining files manually. dataDir.migration.failure.partial.old = Old directory: %S