aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-04-18 10:02:02 -0700
committerChris Lu <chris.lu@gmail.com>2021-04-18 10:02:02 -0700
commit54410ca955cf4078684bca17b4363dc33ef433ed (patch)
tree574495e4a30e6d83e35cbad61b1339fb0fd031de /weed/command/mount_std.go
parentb0127645a59bf80e7746d3bf483ee4b5c34ba74f (diff)
downloadseaweedfs-54410ca955cf4078684bca17b4363dc33ef433ed.tar.xz
seaweedfs-54410ca955cf4078684bca17b4363dc33ef433ed.zip
cleaner way to set readonly
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 9df43e40a..2474cf7dd 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -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