Updated Errorhandling of UnlockWorkflow

This commit is contained in:
JaniruTEC
2020-08-18 16:57:55 +02:00
parent 4110057fa1
commit 6aa14fcfb1
3 changed files with 39 additions and 14 deletions
@@ -35,7 +35,6 @@ import javax.inject.Named;
import javax.inject.Provider;
import java.io.IOException;
import java.nio.file.NoSuchFileException;
import java.nio.file.NotDirectoryException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.EnumSet;
@@ -123,9 +122,6 @@ public class Vault {
}
public synchronized void unlock(CharSequence passphrase) throws CryptoException, IOException, VolumeException, InvalidMountPointException {
if (vaultSettings.useCustomMountPath().get() && Strings.isNullOrEmpty(vaultSettings.customMountPath().get())) {
throw new NotDirectoryException("");
}
CryptoFileSystem fs = getCryptoFileSystem(passphrase);
volume = volumeProvider.get();
volume.mount(fs, getEffectiveMountFlags());