Commit d4936244 authored by Łukasz Magiera's avatar Łukasz Magiera

path: add a comment on dropping error in ResolveToLastNode

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent de6a6e3e
......@@ -70,6 +70,10 @@ func (r *Resolver) ResolveToLastNode(ctx context.Context, fpath path.Path) (ipld
for len(p) > 0 {
lnk, rest, err := r.ResolveOnce(ctx, r.DAG, nd, p)
// Note: have to drop the error here as `ResolveOnce` doesn't handle 'leaf'
// paths (so e.g. for `echo '{"foo":123}' | ipfs dag put` we wouldn't be
// able to resolve `zdpu[...]/foo`)
if lnk == nil {
break
}
......
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