mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
operations: check transfer hashes when using --size-only mode #3419
Before this change we didn't calculate or check hashes of transferred
files if --size-only mode was explicitly set.
This problem was introduced in 20da3e6352
which was released with v1.37
After this change hashes are checked for all transfers unless
--ignore-checksums is set.
This commit is contained in:
parent
f9ceade9b4
commit
7c146e2618
@ -282,7 +282,7 @@ func Copy(ctx context.Context, f fs.Fs, dst fs.Object, remote string, src fs.Obj
|
||||
// work out which hash to use - limit to 1 hash in common
|
||||
var common hash.Set
|
||||
hashType := hash.None
|
||||
if !fs.Config.SizeOnly && !fs.Config.IgnoreChecksum {
|
||||
if !fs.Config.IgnoreChecksum {
|
||||
common = src.Fs().Hashes().Overlap(f.Hashes())
|
||||
if common.Count() > 0 {
|
||||
hashType = common.GetOne()
|
||||
|
Loading…
Reference in New Issue
Block a user