From e401af07b291828c73e7dab970d92e57e01afc7d Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 9 May 2024 17:45:58 +0200 Subject: [PATCH] check: fix error message formatting --- internal/checker/checker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index f60a11f62..016b9c5bf 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -608,12 +608,12 @@ func checkPack(ctx context.Context, r restic.Repository, id restic.ID, blobs []r // failed to load the pack file, return as further checks cannot succeed anyways debug.Log(" error streaming pack (partial %v): %v", isPartialReadError, err) if isPartialReadError { - return &ErrPackData{PackID: id, errs: append(errs, errors.Errorf("partial download error: %w", err))} + return &ErrPackData{PackID: id, errs: append(errs, fmt.Errorf("partial download error: %w", err))} } // The check command suggests to repair files for which a `ErrPackData` is returned. However, this file // completely failed to download such that there's no point in repairing anything. - return errors.Errorf("download error: %w", err) + return fmt.Errorf("download error: %w", err) } if !hash.Equal(id) { debug.Log("pack ID does not match, want %v, got %v", id, hash)