walker: fix error handling if tree cannot be loaded

A tree that cannot be loaded is a fatal error when walking the tree.
Thus, return the error and exit the tree walk.
This commit is contained in:
Michael Eischer committed 2025-06-02 20:04:26 +02:00
1 parent 0dffa1208d
commit 10cfe96cd4
2 files changed
+55 -11

No files matched your search

+2
View File
@@ -91,6 +91,8 @@ func walk(ctx context.Context, repo restic.BlobLoader, prefix string, parentTree
if err == ErrSkipNode {
continue
}
return err
}
err = walk(ctx, repo, p, *node.Subtree, subtree, visitor)