mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
Merge pull request #3327 from MichaelEischer/fix-s3-sanity-check
s3: Fix sanity check
This commit is contained in:
commit
88a23521dd
@ -277,7 +277,7 @@ func (be *Backend) Save(ctx context.Context, h restic.Handle, rd restic.RewindRe
|
||||
debug.Log("%v -> %v bytes, err %#v: %v", objName, info.Size, err, err)
|
||||
|
||||
// sanity check
|
||||
if err != nil && info.Size != rd.Length() {
|
||||
if err == nil && info.Size != rd.Length() {
|
||||
return errors.Errorf("wrote %d bytes instead of the expected %d bytes", info.Size, rd.Length())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user