mirror of
https://github.com/restic/restic.git
synced 2025-12-03 20:51:47 +00:00
make Lookup() return all blobs
+ simplify syntax
This commit is contained in:
committed by
Michael Eischer
parent
020cab8e08
commit
9d1fb94c6c
@@ -5,7 +5,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
@@ -313,8 +312,7 @@ func (res *Restorer) VerifyFiles(ctx context.Context, dst string) (int, error) {
|
||||
|
||||
offset := int64(0)
|
||||
for _, blobID := range node.Content {
|
||||
blobs, _ := res.repo.Index().Lookup(blobID, restic.DataBlob)
|
||||
length := blobs[0].Length - uint(crypto.Extension)
|
||||
length, _ := res.repo.LookupBlobSize(blobID, restic.DataBlob)
|
||||
buf := make([]byte, length) // TODO do I want to reuse the buffer somehow?
|
||||
_, err = file.ReadAt(buf, offset)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user