cleaner way to set readonly

This commit is contained in:
Chris Lu
2021-04-18 10:02:02 -07:00
parent b0127645a5
commit 54410ca955
7 changed files with 3 additions and 58 deletions

View File

@@ -167,6 +167,9 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
if *option.nonempty {
options = append(options, fuse.AllowNonEmptyMount())
}
if *option.readOnly {
options = append(options, fuse.ReadOnly())
}
// find mount point
mountRoot := filerMountRootPath
@@ -200,7 +203,6 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
VolumeServerAccess: *mountOptions.volumeServerAccess,
Cipher: cipher,
UidGidMapper: uidGidMapper,
ReadOnly: *option.readOnly,
})
// mount