From b1dc983d6b7636a981b9be766b4e394b0c9d8b72 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 27 Apr 2020 18:06:37 +0200 Subject: [PATCH] adding cryptofs to pom and add implementation notes to migrate dialogue --- main/pom.xml | 2 +- .../ui/migration/MigrationRunController.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 917d930a3..ee249859c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -24,7 +24,7 @@ UTF-8 - 1.9.7 + 1.10.0-SNAPSHOT 2.2.2 1.2.3 1.1.13 diff --git a/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java b/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java index 08cba8b5c..b051c7701 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java @@ -18,6 +18,7 @@ import org.cryptomator.common.vaults.Vault; import org.cryptomator.common.vaults.VaultState; import org.cryptomator.cryptofs.common.FileSystemCapabilityChecker; import org.cryptomator.cryptofs.migration.Migrators; +import org.cryptomator.cryptofs.migration.api.MigrationContinuationListener; import org.cryptomator.cryptofs.migration.api.MigrationProgressListener; import org.cryptomator.cryptolib.api.InvalidPassphraseException; import org.cryptomator.keychain.KeychainAccess; @@ -107,7 +108,7 @@ public class MigrationRunController implements FxController { }, 0, MIGRATION_PROGRESS_UPDATE_MILLIS, TimeUnit.MILLISECONDS); Tasks.create(() -> { Migrators migrators = Migrators.get(); - migrators.migrate(vault.getPath(), MASTERKEY_FILENAME, password, this::migrationProgressChanged); + migrators.migrate(vault.getPath(), MASTERKEY_FILENAME, password, this::migrationProgressChanged, this::migrationRequiresInput); return migrators.needsMigration(vault.getPath(), MASTERKEY_FILENAME); }).onSuccess(needsAnotherMigration -> { if (needsAnotherMigration) { @@ -149,6 +150,13 @@ public class MigrationRunController implements FxController { }; } + private MigrationContinuationListener.ContinuationResult migrationRequiresInput(MigrationContinuationListener.ContinuationEvent event){ + //TODO: creating a new scene seems a little over the top, maybe stick to this scene + // my suggestion is to make this quick and dirty by setting some elements unmanaged and invisible and afterwards activate them again + // otherwise: We need a more abstract runController which has two subviews (run and halted), see mainWindow for example + return MigrationContinuationListener.ContinuationResult.PROCEED; + } + private void loadStoredPassword() { assert keychainAccess.isPresent(); char[] storedPw = null;