check: Fix misleading message which printed errors instead of differences

See: https://forum.rclone.org/t/tons-of-data-corruption-after-rclone-copy-to-mega-can-rclone-correct-it/17017/7
This commit is contained in:
Nick Craig-Wood 2020-06-12 17:00:48 +01:00
parent a1c9612d75
commit 7c4ba9fcb2
1 changed files with 4 additions and 1 deletions

View File

@ -915,7 +915,10 @@ func CheckFn(ctx context.Context, fdst, fsrc fs.Fs, check checkFn, oneway bool)
fs.Logf(fsrc, "%d files missing", c.srcFilesMissing)
}
fs.Logf(fdst, "%d differences found", accounting.Stats(ctx).GetErrors())
fs.Logf(fdst, "%d differences found", c.differences)
if errs := accounting.Stats(ctx).GetErrors(); errs > 0 {
fs.Logf(fdst, "%d errors while checking", errs)
}
if c.noHashes > 0 {
fs.Logf(fdst, "%d hashes could not be checked", c.noHashes)
}