@cryptotaxi247 / kubo / commits / e8a49d94a

Make non recursive resolve print the result Currently it prints out error message but should just print the intermediate result as it is what we expect.

Make non recursive resolve print the result Currently it prints out error message but should just print the intermediate result as it is what we expect. License: MIT Signed-off-by: Jakub Sztandera <kubuxu@gmail.com>

Jakub Sztandera committed Feb 2, 2016 at 18:28 UTC e8a49d94a6670f00f1c62096796b76ec555ce5fe
1 file changed +3 -1
core/commands/resolve.go
+3 -1
@@ -6,6 +6,7 @@ import (
6
7 cmds "github.com/ipfs/go-ipfs/commands"
8 "github.com/ipfs/go-ipfs/core"
9 + ns "github.com/ipfs/go-ipfs/namesys"
10 path "github.com/ipfs/go-ipfs/path"
11 u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
12 )
@@ -82,7 +83,8 @@ Resolve the value of an IPFS DAG path:
83 // the case when ipns is resolved step by step
84 if strings.HasPrefix(name, "/ipns/") && !recursive {
85 p, err := n.Namesys.ResolveN(req.Context(), name, 1)
85 - if err != nil {
86 + // ErrResolveRecursion is fine
87 + if err != nil && err != ns.ErrResolveRecursion {
88 res.SetError(err, cmds.ErrNormal)
89 return
90 }