From 433a6aad292b8799a65c9cbf5a1488b1b9f06908 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 9 May 2024 17:46:36 +0200 Subject: [PATCH] repository: remove redundant blob loading fallback from RepairPacks LoadBlobsFromPack already implements the same fallback behavior. --- internal/repository/repair_pack.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/repository/repair_pack.go b/internal/repository/repair_pack.go index a4261517a..a0bd56012 100644 --- a/internal/repository/repair_pack.go +++ b/internal/repository/repair_pack.go @@ -31,12 +31,8 @@ func RepairPacks(ctx context.Context, repo restic.Repository, ids restic.IDSet, err := repo.LoadBlobsFromPack(wgCtx, b.PackID, blobs, func(blob restic.BlobHandle, buf []byte, err error) error { if err != nil { - // Fallback path - buf, err = repo.LoadBlob(wgCtx, blob.Type, blob.ID, nil) - if err != nil { - printer.E("failed to load blob %v: %v", blob.ID, err) - return nil - } + printer.E("failed to load blob %v: %v", blob.ID, err) + return nil } id, _, _, err := repo.SaveBlob(wgCtx, blob.Type, buf, restic.ID{}, true) if !id.Equal(blob.ID) {