Refactored method FuseVolume#prepareTemporaryMountPoint

Refactored method FuseVolume#prepareTemporaryMountPoint to be more readable (removed duplicated code)
This commit is contained in:
JaniruTEC
2020-07-20 21:55:49 +02:00
parent c59d3cd03f
commit 902e66906a

View File

@@ -74,13 +74,11 @@ public class FuseVolume implements Volume {
// https://github.com/osxfuse/osxfuse/issues/306#issuecomment-245114592:
// In order to allow non-admin users to mount FUSE volumes in `/Volumes`,
// starting with version 3.5.0, FUSE will create non-existent mount points automatically.
if (IS_MAC && mountPoint.getParent().equals(Paths.get("/Volumes"))) {
return mountPoint;
} else {
if (!(IS_MAC && mountPoint.getParent().equals(Paths.get("/Volumes")))) {
Files.createDirectories(mountPoint);
this.createdTemporaryMountPoint = true;
return mountPoint;
}
return mountPoint;
}
private Path chooseNonExistingTemporaryMountPoint() throws VolumeException {