mirror of
https://github.com/restic/restic.git
synced 2026-10-20 00:08:11 +00:00
Remove blob size cache from restic mount
This commit is contained in:
1 parent
5d8d70542f
commit
07da61baee
6 files changed
+16
-62
No files matched your search
@@ -35,13 +35,9 @@ func newFile(ctx context.Context, root *Root, inode uint64, node *restic.Node) (
|
||||
var bytes uint64
|
||||
cumsize := make([]uint64, 1+len(node.Content))
|
||||
for i, id := range node.Content {
|
||||
size, ok := root.blobSizeCache.Lookup(id)
|
||||
if !ok {
|
||||
var found bool
|
||||
size, found = root.repo.LookupBlobSize(id, restic.DataBlob)
|
||||
if !found {
|
||||
return nil, errors.Errorf("id %v not found in repository", id)
|
||||
}
|
||||
size, found := root.repo.LookupBlobSize(id, restic.DataBlob)
|
||||
if !found {
|
||||
return nil, errors.Errorf("id %v not found in repository", id)
|
||||
}
|
||||
|
||||
bytes += uint64(size)
|
||||
|
||||
Reference in new issue
Block a user