From 2de151aebe463c010d51219e2d79087894ca03c0 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Wed, 18 Nov 2020 18:08:00 +0100 Subject: [PATCH] use less generic name --- .../common/mountpoint/MountPointHelper.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointHelper.java b/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointHelper.java index c72aeb44c..704f2f62d 100644 --- a/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointHelper.java +++ b/main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointHelper.java @@ -20,11 +20,10 @@ import java.util.Optional; class MountPointHelper { public static Logger LOG = LoggerFactory.getLogger(MountPointHelper.class); - private static final int MAX_TMPMOUNTPOINT_CREATION_RETRIES = 10; private final Optional tmpMountPointDir; - private volatile boolean alreadyChecked = false; + private volatile boolean unmountDebrisCleared = false; @Inject public MountPointHelper(Environment env) { @@ -55,13 +54,13 @@ class MountPointHelper { } public synchronized void clearIrregularUnmountDebrisIfNeeded() { - if (alreadyChecked || tmpMountPointDir.isEmpty()) { - return; //nuthin to do + if (unmountDebrisCleared || tmpMountPointDir.isEmpty()) { + return; // nothing to do } if (Files.exists(tmpMountPointDir.get(), LinkOption.NOFOLLOW_LINKS)) { clearIrregularUnmountDebris(tmpMountPointDir.get()); } - alreadyChecked = true; + unmountDebrisCleared = true; } private void clearIrregularUnmountDebris(Path dirContainingMountPoints) { @@ -92,7 +91,7 @@ class MountPointHelper { } catch (IOException e) { LOG.warn("Unable to perform cleanup of mountpoint dir {}.", dirContainingMountPoints, e); } finally { - alreadyChecked = true; + unmountDebrisCleared = true; } }