From 6657b83da76ea4164b6273613f848872dcdf1ea6 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Wed, 11 Jan 2017 20:47:26 -0500 Subject: [PATCH] "ipfs name publish": use path.ParsePath instead of casting input License: MIT Signed-off-by: Kevin Atkinson --- core/commands/publish.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/commands/publish.go b/core/commands/publish.go index 2b98e8f08f9..4686d7f40b6 100644 --- a/core/commands/publish.go +++ b/core/commands/publish.go @@ -117,7 +117,13 @@ Publish an 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