"ipfs name publish": use path.ParsePath instead of casting input
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
Kevin Atkinson committed
Jan 11, 2017 at 20:47 UTC
6657b83da76ea4164b6273613f848872dcdf1ea6
1 file changed
+7
-1
core/commands/publish.go
+7
-1
@@ -117,7 +117,13 @@ Publish an <ipfs-path> to another public key (not implemented):
117
return
118
}
119
120
- output, err := publish(ctx, n, k, path.Path(pstr), popts)
120
+ pth, err := path.ParsePath(pstr)
121
+ if err != nil {
122
+ res.SetError(err, cmds.ErrNormal)
123
+ return
124
+ }
125
+
126
+ output, err := publish(ctx, n, k, pth, popts)
127
if err != nil {
128
res.SetError(err, cmds.ErrNormal)
129
return