提交 6657b83d 作者: Kevin Atkinson

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

License: MIT
Signed-off-by: 's avatarKevin Atkinson <k@kevina.org>
上级 3faf8974
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论