mirror of
https://github.com/restic/restic.git
synced 2025-12-14 12:01:49 +00:00
make Lookup() return all blobs
+ simplify syntax
This commit is contained in:
committed by
Michael Eischer
parent
020cab8e08
commit
9d1fb94c6c
@@ -165,8 +165,7 @@ func runCat(gopts GlobalOptions, args []string) error {
|
||||
|
||||
case "blob":
|
||||
for _, t := range []restic.BlobType{restic.DataBlob, restic.TreeBlob} {
|
||||
_, found := repo.Index().Lookup(id, t)
|
||||
if !found {
|
||||
if !repo.Index().Has(id, t) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -465,8 +465,8 @@ func (f *Finder) findObjectPack(ctx context.Context, id string, t restic.BlobTyp
|
||||
return
|
||||
}
|
||||
|
||||
blobs, found := idx.Lookup(rid, t)
|
||||
if !found {
|
||||
blobs := idx.Lookup(rid, t)
|
||||
if len(blobs) == 0 {
|
||||
Printf("Object %s not found in the index\n", rid.Str())
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user