瀏覽代碼

use less generic name

Sebastian Stenzel 4 年之前
父節點
當前提交
2de151aebe
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      main/commons/src/main/java/org/cryptomator/common/mountpoint/MountPointHelper.java

+ 5 - 6
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<Path> 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;
 		}
 	}