repository: fix error handling in repair pack if blob upload fails

This commit is contained in:
Michael Eischer
2026-05-31 15:39:52 +02:00
parent 4c23c5946f
commit c95ef18afb
+1 -1
View File
@@ -97,7 +97,7 @@ func reuploadBlobsFromPack(ctx context.Context, repo *Repository, packID restic.
return nil
}
id, _, _, err := uploader.SaveBlob(ctx, blob.Type, buf, restic.ID{}, true)
if !id.Equal(blob.ID) {
if err == nil && !id.Equal(blob.ID) {
panic("pack id mismatch during upload")
}
return err