Skip to content

Instantly share code, notes, and snippets.

@pmrowla
Last active September 7, 2024 12:44
Show Gist options
  • Save pmrowla/ca2d297227f3df72109e492d61994ad7 to your computer and use it in GitHub Desktop.
Save pmrowla/ca2d297227f3df72109e492d61994ad7 to your computer and use it in GitHub Desktop.
patch for homebrew rsync 3.3.0 to workaround https://github.com/RsyncProject/rsync/issues/479
--- rsync.c 2024-09-07 21:36:17
+++ rsync.c.patched 2024-09-07 21:36:13
@@ -812,7 +812,12 @@
if (preserve_fileflags && F_FFLAGS(file) & ALL_IMMUTABLE)
set_fileflags(fname, F_FFLAGS(file));
#endif
- return 1;
+ /* Force setting file attributes even when file was moved. When
+ * transferring on MacOS to a SMB volume there is a race condition
+ * where the file may be renamed before the modified file times
+ * actually propagate to the SMB server, causing the resulting mtime to
+ * be reset to the current time. */
+ /* return 1; */
}
/* The file was copied, so tweak the perms of the copied file. If it
* was copied to partialptr, move it into its final destination. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment