restorer: pre-allocate files before loading chunks

This commit is contained in:
Michael Eischer
2020-08-15 17:45:05 +02:00
parent 2e7d475029
commit 8cc9514879
8 changed files with 92 additions and 10 deletions

View File

@@ -238,7 +238,7 @@ func (res *Restorer) RestoreTo(ctx context.Context, dst string) error {
idx.Add(node.Inode, node.DeviceID, location)
}
filerestorer.addFile(location, node.Content)
filerestorer.addFile(location, node.Content, int64(node.Size))
return nil
},