mirror of
https://github.com/restic/restic.git
synced 2026-10-17 23:18:12 +00:00
repository: fix error handling in repair pack if blob upload fails
This commit is contained in:
1 parent
4c23c5946f
commit
c95ef18afb
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user