From f1ee991d075b40e2a3cd631dab2488a4066734ba Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Tue, 6 Mar 2018 16:31:08 +0100 Subject: [PATCH] code format + exception handling --- .../java/org/cryptomator/ui/model/FuseVolume.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/model/FuseVolume.java b/main/ui/src/main/java/org/cryptomator/ui/model/FuseVolume.java index ca5a561f9..3acc5bb5c 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/model/FuseVolume.java +++ b/main/ui/src/main/java/org/cryptomator/ui/model/FuseVolume.java @@ -65,11 +65,12 @@ public class FuseVolume implements Volume { return windowsDriveLetters.getAvailableDriveLetters().iterator().next() + ":\\"; } } else if (vaultSettings.individualMountPath().isNotNull().get()) { - //specific path given - return vaultSettings.individualMountPath().getValue(); - } - //choose default path - return SystemUtils.IS_OS_MAC ? DEFAULT_MOUNTROOTPATH_MAC : DEFAULT_MOUNTROOTPATH_LINUX; + //specific path given + return vaultSettings.individualMountPath().getValue(); + } else { + //choose default path + return SystemUtils.IS_OS_MAC ? DEFAULT_MOUNTROOTPATH_MAC : DEFAULT_MOUNTROOTPATH_LINUX; + } } @Override @@ -77,7 +78,8 @@ public class FuseVolume implements Volume { try { fuseMnt.reveal(); } catch (org.cryptomator.frontend.fuse.mount.CommandFailedException e) { - LOG.info("Revealing the vault in file manger failed: "+e.getMessage()); + LOG.info("Revealing the vault in file manger failed: " + e.getMessage()); + throw new CommandFailedException(e); } }