mirror of
https://github.com/restic/restic.git
synced 2025-11-14 23:22:49 +00:00
make Lookup() return all blobs
+ simplify syntax
This commit is contained in:
committed by
Michael Eischer
parent
020cab8e08
commit
9d1fb94c6c
@@ -146,8 +146,8 @@ func (r *Repository) LoadBlob(ctx context.Context, t restic.BlobType, id restic.
|
||||
debug.Log("load %v with id %v (buf len %v, cap %d)", t, id, len(buf), cap(buf))
|
||||
|
||||
// lookup packs
|
||||
blobs, found := r.idx.Lookup(id, t)
|
||||
if !found {
|
||||
blobs := r.idx.Lookup(id, t)
|
||||
if len(blobs) == 0 {
|
||||
debug.Log("id %v not found in index", id)
|
||||
return nil, errors.Errorf("id %v not found in repository", id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user