diff --git a/main/commons/src/main/java/org/cryptomator/common/mountpoint/TemporaryMountPointChooser.java b/main/commons/src/main/java/org/cryptomator/common/mountpoint/TemporaryMountPointChooser.java
index 60991b97e..f9a01e028 100644
--- a/main/commons/src/main/java/org/cryptomator/common/mountpoint/TemporaryMountPointChooser.java
+++ b/main/commons/src/main/java/org/cryptomator/common/mountpoint/TemporaryMountPointChooser.java
@@ -69,13 +69,20 @@ public class TemporaryMountPointChooser implements MountPointChooser {
try {
switch (caller.getMountPointRequirement()) {
case PARENT_NO_MOUNT_POINT -> {
- Files.createDirectories(mountPoint.getParent());
- LOG.debug("Successfully created folder for mount point: {}", mountPoint);
+ //Create everything up to the parent (but not the actual mountpoint)
+ Path parent = mountPoint.getParent();
+ Files.createDirectories(parent);
+
+ //Get the name of the parent directory (#getFileName())
+ //or just use the parent if the name is null (that's the case if parent is the root)
+ Path parentName = parent.getFileName() != null ? parent.getFileName() : parent;
+ LOG.debug("Successfully created/checked parent folder (\"{}\") for mount point: {}", parentName, mountPoint);
return false;
}
case EMPTY_MOUNT_POINT -> {
+ //Create everything up to the mountpoint (including the actual mountpoint)
Files.createDirectories(mountPoint);
- LOG.debug("Successfully created mount point: {}", mountPoint);
+ LOG.debug("Successfully created/checked mount point: {}", mountPoint);
return true;
}
case NONE -> {
diff --git a/main/pom.xml b/main/pom.xml
index 8702b89d9..d6e7fcadc 100644
--- a/main/pom.xml
+++ b/main/pom.xml
@@ -26,7 +26,7 @@
1.9.12
2.2.3
- 1.2.3
+ 1.2.4
1.1.15
1.0.12
diff --git a/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java b/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java
index 7b0af6042..792edbf91 100644
--- a/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java
+++ b/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java
@@ -12,6 +12,7 @@ import org.cryptomator.ui.common.FxmlScene;
import javax.inject.Inject;
+//At the current point in time only the CustomMountPointChooser may cause this window to be shown.
@UnlockScoped
public class UnlockInvalidMountPointController implements FxController {