Created attachment 7178 [details] Fix error when running without --link-by-hash Don't pass F_SUM(file) into receive_data() if not using --link-by-hash. When running without --link-by-hash (and without --checksum), F_SUM(file) isn't allocated. However this location was being unconditionally passed into receive_data() which would then write into it, stamping on whatever happened to be there. The actual error seen depends on what exactly was getting stamped on, which depends on the file list at the time, but on my box... Unpatched: $ mkdir -p /tmp/src.d/{a,b} /tmp/dst.d $ echo foo > /tmp/src.d/a/a $ ln /tmp/src.d/{a,b}/a $ ./rsync -av /tmp/src.d /tmp/dst.d sending incremental file list src.d/ src.d/a/ src.d/a/a src.d/b/ src.d/b/a received request to transfer non-regular file: 8 [receiver] rsync error: protocol incompatibility (code 2) at ../rsync/rsync.c(403) [receiver=3.1.0dev] Patched: $ ./rsync -av /tmp/src.d /tmp/dst.d sending incremental file list src.d/ src.d/a/ src.d/a/a src.d/b/ src.d/b/a sent 228 bytes received 70 bytes 596.00 bytes/sec total size is 8 speedup is 0.03
The latest code uses "sender_file_sum", and thus avoids this issue. Thanks for the report!