aboutsummaryrefslogtreecommitdiff
path: root/weed/command/fuse.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-07-02 13:33:15 -0700
committerChris Lu <chris.lu@gmail.com>2021-07-02 13:33:17 -0700
commitd8bda0b2294afe59f0edc062fd145cd24ea725db (patch)
treed1c4594dbb344a0648d3c6398d00bb4933feee42 /weed/command/fuse.go
parent53ecae7c7b41ec83fa0c03ef52615380439f7682 (diff)
downloadseaweedfs-d8bda0b2294afe59f0edc062fd145cd24ea725db.tar.xz
seaweedfs-d8bda0b2294afe59f0edc062fd145cd24ea725db.zip
locate the weed binary
Diffstat (limited to 'weed/command/fuse.go')
-rw-r--r--weed/command/fuse.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/command/fuse.go b/weed/command/fuse.go
index f2534e853..609892b5b 100644
--- a/weed/command/fuse.go
+++ b/weed/command/fuse.go
@@ -195,7 +195,11 @@ func runFuse(cmd *Command, args []string) bool {
// the master start the child, release it then finish himself
if masterProcess {
- arg0 := os.Args[0]
+ arg0, err := os.Executable()
+ if err != nil {
+ panic(err)
+ }
+
argv := append(os.Args, "-o", "child")
attr := os.ProcAttr{}