retrieval: Fix parseDagSpec root check

This commit is contained in:
Łukasz Magiera 2021-11-16 12:58:52 +01:00
parent 53a48df77e
commit 74f645a098

View File

@ -1078,7 +1078,7 @@ func parseDagSpec(ctx context.Context, root cid.Cid, dsp []api.DagSpec, ds forma
return nil, xerrors.Errorf("error while locating partial retrieval sub-root: %w", err) return nil, xerrors.Errorf("error while locating partial retrieval sub-root: %w", err)
} }
if out[i].root == cid.Undef { if newRoot == cid.Undef {
return nil, xerrors.Errorf("path selection does not match a node within %s", root) return nil, xerrors.Errorf("path selection does not match a node within %s", root)
} }