forked from TrueCloudLab/restic
restore: optimize memory usage
This commit is contained in:
parent
1369658a32
commit
a9a60f77ce
1 changed files with 3 additions and 1 deletions
|
@ -120,7 +120,9 @@ func (res *Restorer) traverseTree(ctx context.Context, target, location string,
|
|||
return hasRestored, res.Error(location, err)
|
||||
}
|
||||
|
||||
for _, node := range tree.Nodes {
|
||||
for i, node := range tree.Nodes {
|
||||
// allow GC of tree node
|
||||
tree.Nodes[i] = nil
|
||||
|
||||
// ensure that the node name does not contain anything that refers to a
|
||||
// top-level directory.
|
||||
|
|
Loading…
Reference in a new issue