提交 94a53ac7 作者: Jeromy Johnson

Merge pull request #2283 from Kubuxu/fix/resolve-norec

Make non recursive resolve print the result
...@@ -6,6 +6,7 @@ import ( ...@@ -6,6 +6,7 @@ import (
cmds "github.com/ipfs/go-ipfs/commands" cmds "github.com/ipfs/go-ipfs/commands"
"github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/core"
ns "github.com/ipfs/go-ipfs/namesys"
path "github.com/ipfs/go-ipfs/path" path "github.com/ipfs/go-ipfs/path"
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
) )
...@@ -82,7 +83,8 @@ Resolve the value of an IPFS DAG path: ...@@ -82,7 +83,8 @@ Resolve the value of an IPFS DAG path:
// the case when ipns is resolved step by step // the case when ipns is resolved step by step
if strings.HasPrefix(name, "/ipns/") && !recursive { if strings.HasPrefix(name, "/ipns/") && !recursive {
p, err := n.Namesys.ResolveN(req.Context(), name, 1) p, err := n.Namesys.ResolveN(req.Context(), name, 1)
if err != nil { // ErrResolveRecursion is fine
if err != nil && err != ns.ErrResolveRecursion {
res.SetError(err, cmds.ErrNormal) res.SetError(err, cmds.ErrNormal)
return return
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论