aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-06-12 11:46:58 -0700
committerChris Lu <chris.lu@gmail.com>2020-06-12 11:46:58 -0700
commit0d1d83a5a5067402dce0b2c9e1caae2022466a76 (patch)
tree2c96348306365f685466f19683a9bb1505aa4819 /weed/command/mount_std.go
parent00f96d86a147a48e85d4d79d2c2c3bcdcf5c5b8f (diff)
downloadseaweedfs-0d1d83a5a5067402dce0b2c9e1caae2022466a76.tar.xz
seaweedfs-0d1d83a5a5067402dce0b2c9e1caae2022466a76.zip
mount: add option to auto create dir to mount
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index b6715fc30..915754166 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -88,6 +88,9 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
uid, gid := uint32(0), uint32(0)
// detect mount folder mode
+ if *option.dirAutoCreate {
+ os.MkdirAll(dir, 0755)
+ }
mountMode := os.ModeDir | 0755
fileInfo, err := os.Stat(dir)
if err == nil {