Skip to content

Commit b3e7a91

Browse files
committed
fixes #81
1 parent c6c9ded commit b3e7a91

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/cryptomator/cli/MountSetup.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ private Map<MountCapability, Boolean> listSpecifiedMountOptions() {
110110
}
111111

112112
Mount mount(FileSystem fs) throws MountFailedException {
113-
if (!mountService.hasCapability(MOUNT_TO_SYSTEM_CHOSEN_PATH) && mountPoint.isEmpty()) {
113+
boolean requiresMountPoint = Set.of(MOUNT_TO_EXISTING_DIR, //
114+
MOUNT_WITHIN_EXISTING_PARENT, //
115+
MOUNT_AS_DRIVE_LETTER)
116+
.stream().anyMatch(mountService::hasCapability);
117+
if( requiresMountPoint && mountPoint.isEmpty()){
114118
throw new RuntimeException("Unsupported configuration: Mounter %s requires a mount point. Use --mountPoint /path/to/mount/point to specify it.".formatted(mountService.getClass().getName()));
115119
}
116120

0 commit comments

Comments
 (0)