-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
The --fileflags patch seems to mix-up the copied BSD flags at least during a remote rsync.
In flist.c: While the sender serialises the file's metadata in the order of mode, file flags and then (optionally) atime, the patch reads this serialisation on the receiver side in the wrong order of mode, atime and then flags. This means that in case one uses the corresponding sync option to send atimes for files, the patch interprets the atime value as the BSD flags.
Solution:
In flist.c:recv_file_entry(), move the fileflag receiving code
#ifdef SUPPORT_FILEFLAGS
if (preserve_fileflags && !(xflags & XMIT_SAME_FLAGS))
fileflags = (uint32)read_int(f);
#endif
about 15 lines up just after this condition:
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
Environment: rsync-3.2.7.tar.gz + fileflags patch (rsync-patches-3.2.7.tar.gz, Jan 2023), macOS 12.6, arm64
Metadata
Metadata
Assignees
Labels
No labels