mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-02 12:20:03 +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
|
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 {
|
if err != nil {
|
||||||
res.SetError(err, cmds.ErrNormal)
|
res.SetError(err, cmds.ErrNormal)
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user