mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-21 20:21:27 +00:00
solve some todos
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user