First of all, thank you very much for your prompt fix, I really appreciate it as I'm the only one who reported the issue so far.
First, I did a check with --checksum
to compare the behavior. In the test below, rclone
is the system-wide rclone install (1.53), while ./rclone
is the beta (1.54).
PS C:\Users\Marton\Downloads\rclone-v1.54.0-beta.4815.f9750719f.fix-pcloud-eu-hash-windows-amd64> rclone sync pcloud:Joplin D:\pcloud\Joplin --dry-run -P --checksum
2020-10-08 20:38:25 NOTICE: Local file system at //?/D:/pcloud/Joplin: --checksum is in use but the source and destination have no hashes in common; falling back to --size-only
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 3856 / 3856, 100%
Elapsed time: 1m25.4s
PS C:\Users\Marton\Downloads\rclone-v1.54.0-beta.4815.f9750719f.fix-pcloud-eu-hash-windows-amd64> ./rclone sync pcloud:Joplin D:\pcloud\Joplin --dry-run -P --checksum
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 3856 / 3856, 100%
Elapsed time: 1m23.2s
As you can see, your beta did not report the checksum error and did the comparison correctly.
But I also tested whether hashes actually work for a modified file (same size but different content):
PS C:\Users\Marton\Downloads\rclone-v1.54.0-beta.4815.f9750719f.fix-pcloud-eu-hash-windows-amd64> rclone sync pcloud:hashtest C:\hashtest --checksum --verbose
2020/10/08 20:46:52 NOTICE: Local file system at //?/C:/hashtest: --checksum is in use but the source and destination have no hashes in common; falling back to --size-only
2020/10/08 20:46:52 INFO : There was nothing to transfer
2020/10/08 20:46:52 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 1 / 1, 100%
Elapsed time: 0.6s
PS C:\Users\Marton\Downloads\rclone-v1.54.0-beta.4815.f9750719f.fix-pcloud-eu-hash-windows-amd64> ./rclone sync pcloud:hashtest C:\hashtest --checksum --verbose
2020/10/08 20:47:01 INFO : modified.txt: Copied (replaced existing)
2020/10/08 20:47:01 INFO :
Transferred: 8 / 8 Bytes, 100%, 16 Bytes/s, ETA 0s
Checks: 1 / 1, 100%
Transferred: 1 / 1, 100%
Elapsed time: 0.9s
As you can see, 1.53 did not transfer the modified file (it had the same size), but 1.54 beta discovered the different hash and updated the local file.
In short: this fix works exactly as described, I'll update this thread once pCloud replies, and I agree with you not the pull these changes to the master branch before. Awesome work, thank you.