Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
This repository was archived by the owner on May 20, 2026. It is now read-only.

incorrect syncing of file flags during remote rsync by fileflags.diff  #7

Description

@uroehm

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions