Skip to content

Commit

Permalink
Merge pull request #3592 from ipfs/kevina/publish-parse-path
Browse files Browse the repository at this point in the history
"ipfs name publish": use path.ParsePath instead of casting input
  • Loading branch information
whyrusleeping authored Jan 12, 2017
2 parents 3faf897 + 6657b83 commit f8ba7c0
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 f8ba7c0

Please sign in to comment.