Skip to content

Commit

Permalink
Display "Migration in progress — do not interrupt…" during migration
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dstillman committed Nov 16, 2016
1 parent 062ff18 commit 4863670
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chrome/content/zotero/xpcom/zotero.js
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions chrome/locale/en-US/zotero/zotero.properties
Expand Up @@ -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
Expand Down

0 comments on commit 4863670

Please sign in to comment.