Skip to content

Commit

Permalink
"ipfs name publish": use path.ParsePath instead of casting input
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
  • Loading branch information
kevina committed Jan 12, 2017
1 parent 3faf897 commit 6657b83
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/commands/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6657b83

Please sign in to comment.