retrieval: Support DM-paths in ls

This commit is contained in:
Łukasz Magiera
2021-11-22 12:46:29 +01:00
parent dd78e75dd6
commit 2c583b03ff
2 changed files with 59 additions and 13 deletions
-4
View File
@@ -1052,10 +1052,6 @@ func parseDagSpec(ctx context.Context, root cid.Cid, dsp []api.DagSpec, ds forma
func(p traversal.Progress, n ipld.Node, r traversal.VisitReason) error {
if r == traversal.VisitReason_SelectionMatch {
if p.LastBlock.Path.String() != p.Path.String() {
return xerrors.Errorf("unsupported selection path '%s' does not correspond to a block boundary (a.k.a. CID link)", p.Path.String())
}
if p.LastBlock.Link == nil {
// this is likely the root node that we've matched here
// todo: is this a correct assumption