Rclone sync behavior when used with crypt

I have a question about a previous thread:

Specifically, regarding this question:

so when i do a rclone sync, how are the files compared? modtime? size?

And this answer:

modtime+size (both combined, although with a backend-determined "precision margin" for the modtime component as backends store to different levels of precision.)

I don't understand how size can be used in the comparison if the original file and the crypted files have different sizes.

It doesn't seem rclone is crypting the source in order to run this comparison.

Can someone care to clarify?

hello and welcome to the forum,

that is a very good question.

at first i thought that rclone saved that info using metadata, but i could not find it.
tested using rclone lsl remote_crypt: --dump=headers,bodies

so i took a look a the source code and found that:
rclone calculates the decrypted size from the crypted size.

here is the rclone source code

1 Like

Thanks for going through the source code to find the answer!

Kind regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.