diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-07-16 13:24:53 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-07-16 13:24:53 -0700 |
| commit | 2b2ca7d1dca7443bfd89379ac2f288ea5aa85dd8 (patch) | |
| tree | 8b5f5ccf6d8d82e9b681229fab8e515e74380caf | |
| parent | 2629da2cb98df91a5a59772f4d1b69931c7c2a5e (diff) | |
| download | seaweedfs-2b2ca7d1dca7443bfd89379ac2f288ea5aa85dd8.tar.xz seaweedfs-2b2ca7d1dca7443bfd89379ac2f288ea5aa85dd8.zip | |
stop if the directory can not be found
related to https://github.com/chrislusf/seaweedfs/issues/1391
| -rw-r--r-- | weed/command/mount_std.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 915754166..7520de784 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -13,6 +13,9 @@ import ( "strings" "time" + "github.com/seaweedfs/fuse" + "github.com/seaweedfs/fuse/fs" + "github.com/chrislusf/seaweedfs/weed/filesys" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb" @@ -20,8 +23,6 @@ import ( "github.com/chrislusf/seaweedfs/weed/security" "github.com/chrislusf/seaweedfs/weed/util" "github.com/chrislusf/seaweedfs/weed/util/grace" - "github.com/seaweedfs/fuse" - "github.com/seaweedfs/fuse/fs" ) func runMount(cmd *Command, args []string) bool { @@ -97,6 +98,9 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { mountMode = os.ModeDir | fileInfo.Mode() uid, gid = util.GetFileUidGid(fileInfo) fmt.Printf("mount point owner uid=%d gid=%d mode=%s\n", uid, gid, fileInfo.Mode()) + } else { + fmt.Printf("can not stat %s\n", dir) + return false } if uid == 0 { |
