From ce394426b096e935720efef294de26a27ecdda13 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 20 Jun 2020 14:50:40 +0100 Subject: [PATCH] check: fix successful retries with --download counting errors See: https://forum.rclone.org/t/tons-of-data-corruption-after-rclone-copy-to-mega-can-rclone-correct-it/17017 --- fs/operations/operations.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/operations/operations.go b/fs/operations/operations.go index 1829de12c..fe623df5a 100644 --- a/fs/operations/operations.go +++ b/fs/operations/operations.go @@ -1004,7 +1004,7 @@ func checkIdenticalDownload(ctx context.Context, dst, src fs.Object) (differ boo } tr1 := accounting.Stats(ctx).NewTransfer(dst) defer func() { - tr1.Done(err) + tr1.Done(nil) // error handling is done by the caller }() in1 = tr1.Account(in1).WithBuffer() // account and buffer the transfer @@ -1014,7 +1014,7 @@ func checkIdenticalDownload(ctx context.Context, dst, src fs.Object) (differ boo } tr2 := accounting.Stats(ctx).NewTransfer(dst) defer func() { - tr2.Done(err) + tr2.Done(nil) // error handling is done by the caller }() in2 = tr2.Account(in2).WithBuffer() // account and buffer the transfer