Allow immediate retry on partial data dir migration failure

A common cause of this on Windows will likely be open attachment files,
so suggest closing those and make retrying the default action.
This commit is contained in:
Dan Stillman 2016-11-21 04:54:01 -05:00
parent 0668faa584
commit 98e3a9addf
3 changed files with 20 additions and 10 deletions

View file

@ -158,11 +158,14 @@ describe("Zotero Core Functions", function () {
let stub4 = sinon.stub(Zotero.File, "reveal").returns(Zotero.Promise.resolve());
let stub5 = sinon.stub(Zotero.Utilities.Internal, "quitZotero");
var promise = waitForDialog();
var promise2;
// Click "Try Again" the first time, and then "Show Directories and Quit Zotero"
var promise = waitForDialog(function () {
promise2 = waitForDialog(null, 'extra1');
});
yield Zotero.checkForDataDirectoryMigration(oldDir, newDir);
Zotero.debug("Waiting for dialog");
yield promise;
Zotero.debug("Done waiting for dialog");
yield promise2;
assert.isTrue(stub4.calledTwice);
assert.isTrue(stub4.getCall(0).calledWith(oldStorageDir));