mirror of
https://github.com/restic/restic.git
synced 2025-12-14 13:42:16 +00:00
Return real size from SaveBlob
This commit is contained in:
committed by
Michael Eischer
parent
fdc53a9d32
commit
99634c0936
@@ -21,13 +21,13 @@ type saveFail struct {
|
||||
failAt int32
|
||||
}
|
||||
|
||||
func (b *saveFail) SaveBlob(ctx context.Context, t restic.BlobType, buf []byte, id restic.ID, storeDuplicates bool) (restic.ID, bool, error) {
|
||||
func (b *saveFail) SaveBlob(ctx context.Context, t restic.BlobType, buf []byte, id restic.ID, storeDuplicates bool) (restic.ID, bool, int, error) {
|
||||
val := atomic.AddInt32(&b.cnt, 1)
|
||||
if val == b.failAt {
|
||||
return restic.ID{}, false, errTest
|
||||
return restic.ID{}, false, 0, errTest
|
||||
}
|
||||
|
||||
return id, false, nil
|
||||
return id, false, 0, nil
|
||||
}
|
||||
|
||||
func (b *saveFail) Index() restic.MasterIndex {
|
||||
|
||||
Reference in New Issue
Block a user