rename file

Hi, I 'd like to understand what Syncthing does (hash, transfer…) when renaming a file on the master side and what result can be expected on the slave side. When I rename a file, I find it duplicated on the slave side. Is it “normal” ? Thanks, BD

No, unless you have ignore deletes enabled, as rename is delete + create.

Thanks for the answer. Does that mean that the file is hashed again, and the data sent a second time like if it was just another new file (and according hash, re-using what is already on the slave side) ? Btw, I supposed you meaned “create + delete”, instead of “delete + create”, that would destroy already transfered data that should be re-used.

It is hashed again, as we don’t know what the content looks like until it’s hashed.

Whether it’s re-transferred or not depends on a few factors. If it’s a rename for single files less than 4GB, if should be handled as a rename. If it’s a copy, no data should be transferred and it should be reconstructed from existing blocks. If it’s a directory tree rename, it’s likely stuff will get transferred as the creations and deletions are sent in no particular order, which can cause deletes to happen prior creates.

1 Like

Thank you for your explanation. :slight_smile: