1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 10:49:24 +08:00

"ipfs name publish": use path.ParsePath instead of casting input

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
This commit is contained in:
Kevin Atkinson
2017-01-11 20:47:26 -05:00
parent 3faf8974ec
commit 6657b83da7

View File

@ -117,7 +117,13 @@ Publish an <ipfs-path> to another public key (not implemented):
return
}
output, err := publish(ctx, n, k, path.Path(pstr), popts)
pth, err := path.ParsePath(pstr)
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
}
output, err := publish(ctx, n, k, pth, popts)
if err != nil {
res.SetError(err, cmds.ErrNormal)
return