From f26492fc2da715d4db9d1aa0cae394bcba50afaf Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 2 Oct 2017 16:27:08 +0200 Subject: [PATCH] prune: Warn about wrong plaintext blob ID --- internal/repository/repack.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/repository/repack.go b/internal/repository/repack.go index e11aae4dd..3bba26803 100644 --- a/internal/repository/repack.go +++ b/internal/repository/repack.go @@ -3,7 +3,9 @@ package repository import ( "context" "crypto/sha256" + "fmt" "io" + "os" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/fs" @@ -97,7 +99,9 @@ func Repack(ctx context.Context, repo restic.Repository, packs restic.IDSet, kee id := restic.Hash(buf) if !id.Equal(entry.ID) { - return nil, errors.Errorf("read blob %v from %v: wrong data returned, hash is %v", + debug.Log("read blob %v/%v from %v: wrong data returned, hash is %v", + h.Type, h.ID, tempfile.Name(), id) + fmt.Fprintf(os.Stderr, "read blob %v from %v: wrong data returned, hash is %v", h, tempfile.Name(), id) }