@cryptotaxi247 / kubo / commits / b6f89db1d

fix(mount_unix) optionvalue signature

@mappum can you just sanity check me here with a quick LGTM CR?

Brian Tiger Chow committed Nov 12, 2014 at 00:01 UTC b6f89db1d4f9f4ae9f6a8ce0670a15f4367b76f4
1 file changed +7 -3
core/commands2/mount_unix.go
+7 -3
@@ -52,10 +52,14 @@ not be listable, as it is virtual. Accessing known paths directly.
52 fsdone := mountIpfs(ctx.Node, fsdir)
53
54 // get default mount points
55 - nsdir := ctx.Config.Mounts.IPNS
56 - if req.Option("n").Found() {
57 - nsdir, _ = req.Option("n").String()
55 + nsdir, found, err := req.Option("n").String()
56 + if err != nil {
57 + return nil, err
58 }
59 + if !found {
60 + nsdir = ctx.Config.Mounts.IPNS // NB: be sure to not redeclare!
61 + }
62 +
63 nsdone := mountIpns(ctx.Node, nsdir, fsdir)
64
65 // wait until mounts return an error (or timeout if successful)