diff --git a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java index 5d40dbeb8..e15d195bf 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java @@ -26,10 +26,8 @@ import javax.inject.Inject; import javax.inject.Named; import java.io.File; import java.io.IOException; -import java.nio.file.DirectoryNotEmptyException; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; -import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ResourceBundle; @@ -116,14 +114,12 @@ public class CreateNewVaultLocationController implements FxController { Files.delete(createdDir); // assert: dir exists and is empty window.setScene(choosePasswordScene.get()); } catch (FileAlreadyExistsException e) { - LOG.warn("Can not use already existing vault path: {}", vaultPath.get()); + LOG.warn("Can not use already existing vault path {}", vaultPath.get()); warningText.set(resourceBundle.getString("addvaultwizard.new.fileAlreadyExists")); - } catch (NoSuchFileException | DirectoryNotEmptyException e) { - LOG.error("Failed to delete recently created directory.", e); - // TODO show generic error text for unexpected exception } catch (IOException e) { LOG.warn("Can not create vault at path: {}", vaultPath.get()); - // TODO show generic error text for unexpected exception + LOG.warn("Thrown Exception:", e); + warningText.set(resourceBundle.getString("addvaultwizard.new.ioException")); } } diff --git a/main/ui/src/main/resources/i18n/strings.properties b/main/ui/src/main/resources/i18n/strings.properties index 8295961dc..df3e849d1 100644 --- a/main/ui/src/main/resources/i18n/strings.properties +++ b/main/ui/src/main/resources/i18n/strings.properties @@ -37,6 +37,7 @@ addvaultwizard.new.directoryPickerTitle=Select Directory addvaultwizard.new.enterPassword=Enter a password for the vault addvaultwizard.new.fileAlreadyExists=Vault can not be created at this path because some object already exists. addvaultwizard.new.invalidName=Invalid vault name. Please consider a regular directory name. +addvaultwizard.new.ioException=Selected directory failed a basic test. Make sure to have the appropiate access rights and nothing interferes with Cryptomator. ### Password addvaultwizard.new.reenterPassword=Confirm the password addvaultwizard.new.passwordsMatch=Passwords match! diff --git a/main/ui/src/main/resources/i18n/strings_de.properties b/main/ui/src/main/resources/i18n/strings_de.properties index 9eb41383c..b39ce0de7 100644 --- a/main/ui/src/main/resources/i18n/strings_de.properties +++ b/main/ui/src/main/resources/i18n/strings_de.properties @@ -31,6 +31,7 @@ addvaultwizard.new.locationPrompt=… addvaultwizard.new.directoryPickerLabel=Eigenen Ort wählen… addvaultwizard.new.directoryPickerButton=Durchsuchen… addvaultwizard.new.directoryPickerTitle=Wähle ein Verzeichnis +addvaultwizard.new.ioException=Für das ausgewählte Verzeichnis schlug ein Test fehl. Vergewissere dich, dass du Schreibrechte has und nichts Cryptomator blockiert. ### Password addvaultwizard.new.enterPassword=Vergib ein Passwort für den Tresor addvaultwizard.new.fileAlreadyExists=Der Tresor konnte nicht erstellt werden, da der Speicherort bereits belegt ist.