Skip to content

Commit

Permalink
fixes #74
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Mar 29, 2023
1 parent 666850d commit 595b712
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public String displayName() {

@Override
public Set<MountCapability> capabilities() {
return EnumSet.of(MOUNT_FLAGS, MOUNT_AS_DRIVE_LETTER, UNMOUNT_FORCED, READ_ONLY, VOLUME_ID, LOOPBACK_HOST_NAME, FILE_SYSTEM_NAME);
return EnumSet.of(FILE_SYSTEM_NAME, LOOPBACK_HOST_NAME, MOUNT_AS_DRIVE_LETTER, MOUNT_FLAGS, READ_ONLY, UNMOUNT_FORCED, VOLUME_ID, VOLUME_NAME);
}

@Override
Expand All @@ -51,11 +51,6 @@ public WinFspNetworkMountBuilder(Path vfsRoot) {
super(vfsRoot);
}

@Override
public MountBuilder setVolumeName(String name) {
throw new UnsupportedOperationException();
}

@Override
public MountBuilder setVolumeId(String id) {
this.volumeId = id;
Expand Down Expand Up @@ -84,7 +79,9 @@ public MountBuilder setLoopbackHostName(String hostName) {
@Override
protected Set<String> combinedMountFlags() {
var combined = super.combinedMountFlags();
combined.add("-oVolumePrefix=/" + loopbackHostName + "/" + volumeId);
combined.removeIf(flag -> flag.startsWith("-oVolumePrefix="));
combined.removeIf(flag -> flag.startsWith("-oUNC="));
combined.add("-oUNC=/" + loopbackHostName + "/" + volumeId + "/" + volumeName);
return combined;
}
}
Expand Down

0 comments on commit 595b712

Please sign in to comment.