aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-04-10 23:25:41 -0700
committerChris Lu <chris.lu@gmail.com>2019-04-10 23:25:41 -0700
commitc0d6cc0067b3c43f34ec38f48e65852b74d61deb (patch)
treed76f85f5e9e29a4dc5a3b3a14120d62440f965de
parent2f76681d626d29c8ffd0cc81614b1c583514f8b6 (diff)
downloadseaweedfs-c0d6cc0067b3c43f34ec38f48e65852b74d61deb.tar.xz
seaweedfs-c0d6cc0067b3c43f34ec38f48e65852b74d61deb.zip
weed mount: mount to the same folder name
-rw-r--r--weed/command/mount_std.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index c047b94c3..101f6a852 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -9,6 +9,7 @@ import (
"github.com/spf13/viper"
"os"
"os/user"
+ "path"
"runtime"
"strconv"
"strings"
@@ -43,6 +44,8 @@ func runMount(cmd *Command, args []string) bool {
mountMode = os.ModeDir | fileInfo.Mode()
}
+ mountName := path.Base(*mountOptions.dir)
+
// detect current user
uid, gid := uint32(0), uint32(0)
if u, err := user.Current(); err == nil {
@@ -57,7 +60,7 @@ func runMount(cmd *Command, args []string) bool {
util.SetupProfiling(*mountCpuProfile, *mountMemProfile)
options := []fuse.MountOption{
- fuse.VolumeName("SeaweedFS"),
+ fuse.VolumeName(mountName),
fuse.FSName("SeaweedFS"),
fuse.Subtype("SeaweedFS"),
fuse.NoAppleDouble(),