浏览代码

solve some todos

Jan-Peter Klein 1 周之前
父节点
当前提交
8c84720e24

+ 2 - 3
src/main/java/org/cryptomator/common/recovery/RecoveryDirectory.java

@@ -28,7 +28,6 @@ public final class RecoveryDirectory implements AutoCloseable {
 	}
 
 	public static RecoveryDirectory create(Path vaultPath) throws IOException {
-		//TODO: Files.createTmpDirectory Doku lesen und ggf nutzen
 		Path recovery = addR(vaultPath);
 		Files.createDirectory(recovery);
 		return new RecoveryDirectory(vaultPath);
@@ -36,12 +35,12 @@ public final class RecoveryDirectory implements AutoCloseable {
 
 	public void moveRecoveredFiles() throws IOException {
 		Files.move(recoveryPath.resolve(MASTERKEY_FILENAME), vaultPath.resolve(MASTERKEY_FILENAME), StandardCopyOption.REPLACE_EXISTING);
-		Files.move(recoveryPath.resolve(VAULTCONFIG_FILENAME), vaultPath.resolve(VAULTCONFIG_FILENAME)); //TODO: ? StandardCopyOption.REPLACE_EXISTING
+		Files.move(recoveryPath.resolve(VAULTCONFIG_FILENAME), vaultPath.resolve(VAULTCONFIG_FILENAME), StandardCopyOption.REPLACE_EXISTING);
 	}
 
 	private void deleteRecoveryDirectory() {
 		try (var paths = Files.walk(recoveryPath)) {
-			paths.sorted(Comparator.reverseOrder()).forEach(p -> { //TODO: wieso reverseOrder
+			paths.sorted(Comparator.reverseOrder()).forEach(p -> {
 				try {
 					Files.delete(p);
 				} catch (IOException e) {

+ 1 - 2
src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java

@@ -128,12 +128,11 @@ public class RecoveryKeyResetPasswordController implements FxController {
 			if (!vaultListManager.containsVault(vault.getPath())) {
 				vaultListManager.add(vault.getPath());
 			}
-
+			window.close();
 			dialogs.prepareRecoverPasswordSuccess(window, owner, resourceBundle)
 					.setTitleKey("recoveryKey.recoverVaultConfig.title")
 					.setMessageKey("recoveryKey.recover.resetVaultConfigSuccess.message")
 					.build().showAndWait();
-			window.close();
 
 		} catch (IOException | CryptoException e) {
 			LOG.error("Recovery process failed", e);