21
21
import java .util .Set ;
22
22
import java .util .concurrent .TimeoutException ;
23
23
24
+ import static org .cryptomator .integrations .mount .MountCapability .FILE_SYSTEM_NAME ;
24
25
import static org .cryptomator .integrations .mount .MountCapability .MOUNT_AS_DRIVE_LETTER ;
25
26
import static org .cryptomator .integrations .mount .MountCapability .MOUNT_FLAGS ;
26
27
import static org .cryptomator .integrations .mount .MountCapability .MOUNT_TO_EXISTING_DIR ;
@@ -47,7 +48,7 @@ public boolean isSupported() {
47
48
48
49
@ Override
49
50
public Set <MountCapability > capabilities () {
50
- return EnumSet .of (MOUNT_FLAGS , MOUNT_AS_DRIVE_LETTER , MOUNT_WITHIN_EXISTING_PARENT , UNMOUNT_FORCED , READ_ONLY , VOLUME_NAME );
51
+ return EnumSet .of (MOUNT_FLAGS , MOUNT_AS_DRIVE_LETTER , MOUNT_WITHIN_EXISTING_PARENT , UNMOUNT_FORCED , READ_ONLY , VOLUME_NAME , FILE_SYSTEM_NAME );
51
52
}
52
53
53
54
@ Override
@@ -63,6 +64,8 @@ public MountBuilder forFileSystem(Path vfsRoot) {
63
64
64
65
protected static class WinFspMountBuilder extends AbstractMountBuilder {
65
66
67
+ private static String DEFAULT_FS_NAME = "FUSE-NIO-FS" ;
68
+ String fsName = DEFAULT_FS_NAME ;
66
69
boolean isReadOnly = false ;
67
70
68
71
WinFspMountBuilder (Path vfsRoot ) {
@@ -80,6 +83,12 @@ public MountBuilder setMountpoint(Path mountPoint) {
80
83
}
81
84
}
82
85
86
+ @ Override
87
+ public MountBuilder setFileSystemName (String fsName ) {
88
+ this .fsName = fsName ;
89
+ return this ;
90
+ }
91
+
83
92
@ Override
84
93
public MountBuilder setReadOnly (boolean mountReadOnly ) {
85
94
isReadOnly = mountReadOnly ;
@@ -98,6 +107,8 @@ protected Set<String> combinedMountFlags() {
98
107
combined .removeIf (flag -> flag .startsWith ("-oumask=" ));
99
108
combined .add ("-oumask=0333" );
100
109
}
110
+ combined .removeIf (flag -> flag .startsWith ("-oExactFileSystemName=" ));
111
+ combined .add ("-oExactFileSystemName=" +fsName );
101
112
return combined ;
102
113
}
103
114
0 commit comments