retrieval: Fix parseDagSpec root check

This commit is contained in:
Łukasz Magiera
2021-11-22 12:46:29 +01:00
parent 53a48df77e
commit 74f645a098
+1 -1
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)
}
if out[i].root == cid.Undef {
if newRoot == cid.Undef {
return nil, xerrors.Errorf("path selection does not match a node within %s", root)
}