Browse Source

Fixes #2778

ensure that mountpoint is ready
Armin Schrenk 2 years ago
parent
commit
a67477bf3b

+ 5 - 0
src/main/java/org/cryptomator/common/mount/MountWithinParentUtil.java

@@ -51,8 +51,13 @@ public final class MountWithinParentUtil {
 				if (SystemUtils.IS_OS_WINDOWS) {
 					Files.setAttribute(hideaway, WIN_HIDDEN_ATTR, true, LinkOption.NOFOLLOW_LINKS);
 				}
+				while (!Files.notExists(mountPoint)) {
+					Thread.sleep(1000);
+				}
 			} catch (IOException e) {
 				throw new MountPointPreparationException(e);
+			} catch (InterruptedException e) {
+				throw new MountPointPreparationException(e);
 			}
 		}
 	}