mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 19:38:57 +00:00
restore: optimize memory usage
This commit is contained in:
parent
1369658a32
commit
a9a60f77ce
@ -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 New Issue
Block a user