diff --git a/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspMountProvider.java b/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspMountProvider.java index 7966ad5..ad618d8 100644 --- a/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspMountProvider.java +++ b/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspMountProvider.java @@ -28,18 +28,15 @@ import static org.cryptomator.integrations.mount.MountCapability.READ_ONLY; import static org.cryptomator.integrations.mount.MountCapability.UNMOUNT_FORCED; -@Priority(100) +@Priority(90) @OperatingSystem(OperatingSystem.Value.WINDOWS) public class WinFspMountProvider implements MountService { private static final String OS_ARCH = System.getProperty("os.arch").toLowerCase(); - public WinFspMountProvider() { - } - @Override public String displayName() { - return "FUSE (WinFsp)"; + return "WinFSP"; } @Override @@ -47,11 +44,6 @@ public boolean isSupported() { return WinfspUtil.isWinFspInstalled(); } - @Override - public MountBuilder forFileSystem(Path vfsRoot) { - return new WinFspMountBuilder(vfsRoot); - } - @Override public Set capabilities() { return EnumSet.of(MOUNT_FLAGS, MOUNT_AS_DRIVE_LETTER, MOUNT_WITHIN_EXISTING_PARENT, UNMOUNT_FORCED, READ_ONLY); @@ -63,6 +55,11 @@ public String getDefaultMountFlags(String mountName) { return "-ouid=-1 -ogid=-1"; // TODO: research and use correct ones } + @Override + public MountBuilder forFileSystem(Path vfsRoot) { + return new WinFspMountBuilder(vfsRoot); + } + protected static class WinFspMountBuilder extends AbstractMountBuilder { boolean isReadOnly = false; diff --git a/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java b/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java index fa63acc..3edf54d 100644 --- a/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java +++ b/src/main/java/org/cryptomator/frontend/fuse/mount/WinFspNetworkMountProvider.java @@ -14,18 +14,24 @@ import static org.cryptomator.integrations.mount.MountCapability.READ_ONLY; import static org.cryptomator.integrations.mount.MountCapability.UNMOUNT_FORCED; -@Priority(90) +@Priority(100) @OperatingSystem(OperatingSystem.Value.WINDOWS) public class WinFspNetworkMountProvider extends WinFspMountProvider { + @Override + public String displayName() { + return "WinFSP (Network Drive)"; + } + @Override public Set capabilities() { + // no MOUNT_WITHIN_EXISTING_PARENT support here return EnumSet.of(MOUNT_FLAGS, MOUNT_AS_DRIVE_LETTER, UNMOUNT_FORCED, READ_ONLY); } @Override public String getDefaultMountFlags(String mountName) { - return "-ouid=-1 -ogid=-1 -oVolumePrefix=/localhost/" + mountName; // TODO: instead of /localhost/ we can use any made-up hostname + return super.getDefaultMountFlags(mountName) + " -oVolumePrefix=/localhost/" + mountName; // TODO: instead of /localhost/ we can use any made-up hostname } @Override @@ -42,9 +48,10 @@ public WinFspNetworkMountBuilder(Path vfsRoot) { @Override public MountBuilder setMountpoint(Path mountPoint) { if (mountPoint.getRoot().equals(mountPoint)) { // MOUNT_AS_DRIVE_LETTER - return super.setMountpoint(mountPoint); + this.mountPoint = mountPoint; + return this; } else { - throw new IllegalArgumentException("mount point must either be a drive letter or a non-existing node within an existing parent"); + throw new IllegalArgumentException("mount point must be a drive letter"); } } }