forked from TrueCloudLab/restic
Return real size from SaveBlob
This commit is contained in:
parent
fdc53a9d32
commit
99634c0936
13 changed files with 50 additions and 40 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue