mirror of
https://github.com/restic/restic.git
synced 2025-12-03 22:21:47 +00:00
repository: extract LoadTree/SaveTree
The repository has no real idea what a Tree is. So these methods never belonged there.
This commit is contained in:
@@ -53,7 +53,7 @@ type treeVisitor struct {
|
||||
// target is the path in the file system, location within the snapshot.
|
||||
func (res *Restorer) traverseTree(ctx context.Context, target, location string, treeID restic.ID, visitor treeVisitor) (hasRestored bool, err error) {
|
||||
debug.Log("%v %v %v", target, location, treeID)
|
||||
tree, err := res.repo.LoadTree(ctx, treeID)
|
||||
tree, err := restic.LoadTree(ctx, res.repo, treeID)
|
||||
if err != nil {
|
||||
debug.Log("error loading tree %v: %v", treeID, err)
|
||||
return hasRestored, res.Error(location, err)
|
||||
|
||||
Reference in New Issue
Block a user