Commit 4654ed9d authored by Juan Benet's avatar Juan Benet

Merge pull request #1886 from ipfs/fix/ThatPut

fixing putHandler
parents a8fe4e87 47ddd064
...@@ -22,12 +22,12 @@ var ErrNoComponents = errors.New( ...@@ -22,12 +22,12 @@ var ErrNoComponents = errors.New(
// ErrNoLink is returned when a link is not found in a path // ErrNoLink is returned when a link is not found in a path
type ErrNoLink struct { type ErrNoLink struct {
name string Name string
node mh.Multihash Node mh.Multihash
} }
func (e ErrNoLink) Error() string { func (e ErrNoLink) Error() string {
return fmt.Sprintf("no link named %q under %s", e.name, e.node.B58String()) return fmt.Sprintf("no link named %q under %s", e.Name, e.Node.B58String())
} }
// Resolver provides path resolution to IPFS // Resolver provides path resolution to IPFS
...@@ -124,7 +124,7 @@ func (s *Resolver) ResolveLinks(ctx context.Context, ndd *merkledag.Node, names ...@@ -124,7 +124,7 @@ func (s *Resolver) ResolveLinks(ctx context.Context, ndd *merkledag.Node, names
if next == "" { if next == "" {
n, _ := nd.Multihash() n, _ := nd.Multihash()
return result, ErrNoLink{name: name, node: n} return result, ErrNoLink{Name: name, Node: n}
} }
if nlink.Node == nil { if nlink.Node == nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment