- Reduced memory usage for an incremental transfer that has a bunch of small
diretories.
+ - Add support for `--atimes` on macOS.
+
- Rsync can now update the xattrs on a read-only file when your user can
temporarily add user-write permission to the file. (It always worked for a
root transfer.)
#ifdef HAVE_OSX_ACLS
/* If we received a superfluous mask, throw it away. */
duo_item->racl.mask_obj = NO_ENTRY;
+ (void)mode;
#else
if (duo_item->racl.names.count && duo_item->racl.mask_obj == NO_ENTRY) {
/* Mask must be non-empty with lists. */
int do_setattrlist_times(const char *fname, STRUCT_STAT *stp)
{
struct attrlist attrList;
- struct timespec ts;
+ struct timespec ts[2];
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
- ts.tv_sec = stp->st_mtime;
- ts.tv_nsec = stp->ST_MTIME_NSEC;
+ /* Yes, this is in the opposite order of utime and similar. */
+ ts[0].tv_sec = stp->st_mtime;
+ ts[0].tv_nsec = stp->ST_MTIME_NSEC;
+
+ ts[1].tv_sec = stp->st_atime;
+ ts[1].tv_nsec = stp->ST_ATIME_NSEC;
memset(&attrList, 0, sizeof attrList);
attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
- attrList.commonattr = ATTR_CMN_MODTIME;
- return setattrlist(fname, &attrList, &ts, sizeof ts, FSOPT_NOFOLLOW);
+ attrList.commonattr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME;
+ return setattrlist(fname, &attrList, ts, sizeof ts, FSOPT_NOFOLLOW);
}
#endif
#endif
}
}
-#endif
+#endif /* SUPPORT_CRTIMES */
#ifdef HAVE_UTIMENSAT
int do_utimensat(const char *fname, STRUCT_STAT *stp)