fix: add direct pins after the internal ones

License: MIT
Signed-off-by: 's avatarJakub Sztandera <kubuxu@protonmail.ch>
上级 b6eb0850
...@@ -158,16 +158,16 @@ func ColoredSet(ctx context.Context, pn pin.Pinner, ls dag.LinkService, bestEffo ...@@ -158,16 +158,16 @@ func ColoredSet(ctx context.Context, pn pin.Pinner, ls dag.LinkService, bestEffo
output <- Result{Error: err} output <- Result{Error: err}
} }
for _, k := range pn.DirectKeys() {
gcs.Add(k)
}
err = Descendants(ctx, getLinks, gcs, pn.InternalPins()) err = Descendants(ctx, getLinks, gcs, pn.InternalPins())
if err != nil { if err != nil {
errors = true errors = true
output <- Result{Error: err} output <- Result{Error: err}
} }
for _, k := range pn.DirectKeys() {
gcs.Add(k)
}
if errors { if errors {
return nil, ErrCannotFetchAllLinks return nil, ErrCannotFetchAllLinks
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论