mirror of
https://github.com/rclone/rclone.git
synced 2026-10-02 18:55:33 -04:00
operations: check checksums in rcat with known size - fixes #6305
RcatSize streams the body straight into Put behind an ObjectInfo with no hashes, so a known-size upload had its size checked but its checksum never verified, unlike the unknown-size path through Rcat which hashes as it goes. The stream can only be read once, so hash it on the way past and compare with the destination after the upload, as operations.Copy does. A destination which reports no usable hash is still checked by size, and one which fails either check has the failed copy removed.
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f