mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 06:50:40 +02:00
mount: add option to auto create dir to mount
This commit is contained in:
1 parent
00f96d86a1
commit
0d1d83a5a5
2 files changed
+5
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user