From a67477bf3b86b84976f0ab1612198a9ddd9b4d2c Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Wed, 15 Mar 2023 11:37:02 +0100 Subject: [PATCH] Fixes #2778 ensure that mountpoint is ready --- .../org/cryptomator/common/mount/MountWithinParentUtil.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/cryptomator/common/mount/MountWithinParentUtil.java b/src/main/java/org/cryptomator/common/mount/MountWithinParentUtil.java index ca82b54da..47986e5e5 100644 --- a/src/main/java/org/cryptomator/common/mount/MountWithinParentUtil.java +++ b/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); } } }