Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

accounting: reset bytes read during copy retry - fixes #4178

Ankur Gupta10a6a92e524a
diff --git a/fs/accounting/accounting.go b/fs/accounting/accounting.go
index 8a541c9b1..1820b925f 100644
--- a/fs/accounting/accounting.go
+++ b/fs/accounting/accounting.go
@@ -138,6 +138,8 @@ func (acc *Account) UpdateReader(in io.ReadCloser) {
acc.close = in
acc.origIn = in
acc.closed = false
+ acc.lpBytes = 0
+ acc.bytes = int64(0)
if withBuf {
acc.WithBuffer()
}