walker: add callback to inform about leaving a directory

This commit is contained in:
Michael Eischer committed 2024-01-27 13:17:32 +01:00
1 parent b2703a4089
commit 9ecbda059c
6 files changed
+34 -16

No files matched your search

+2 -2
View File
@@ -70,7 +70,7 @@ func sendNodes(ctx context.Context, repo restic.Repository, root *restic.Node, c
return nil
}
err := walker.Walk(ctx, repo, *root.Subtree, func(_ restic.ID, nodepath string, node *restic.Node, err error) error {
err := walker.Walk(ctx, repo, *root.Subtree, walker.WalkVisitor{ProcessNode: func(_ restic.ID, nodepath string, node *restic.Node, err error) error {
if err != nil {
return err
}
@@ -91,7 +91,7 @@ func sendNodes(ctx context.Context, repo restic.Repository, root *restic.Node, c
}
return nil
})
}})
return err
}