fix(commands/mount_unix, optionvalue) handle found, !found
@mappum, could you provide a quick LGTM?
Brian Tiger Chow committed
Nov 11, 2014 at 23:43 UTC
654fa3fe96ef5caab22e0ba216d33d19e3ae2c88
1 file changed
+6
-4
core/commands2/mount_unix.go
+6
-4
@@ -42,10 +42,12 @@ not be listable, as it is virtual. Accessing known paths directly.
42
return nil, err
43
}
44
45
- // update fsdir with flag.
46
- fsdir := ctx.Config.Mounts.IPFS
47
- if req.Option("f").Found() {
48
- fsdir, _ = req.Option("f").String()
45
+ fsdir, found, err := req.Option("f").String()
46
+ if err != nil {
47
+ return nil, err
48
+ }
49
+ if !found {
50
+ fsdir = ctx.Config.Mounts.IPFS // use default value
51
}
52
fsdone := mountIpfs(ctx.Node, fsdir)
53