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:
@ -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
|
||||
|
Reference in New Issue
Block a user