From: Wayne Davison Date: Sun, 10 Oct 2021 21:01:59 +0000 (-0700) Subject: We need stat memcpy. X-Git-Tag: v3.2.4pre1~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3af00277eed3a805ea601476a701f05b11f441a0;p=thirdparty%2Frsync.git We need stat memcpy. --- diff --git a/rsync.c b/rsync.c index 6c5a06bf..7c821986 100644 --- a/rsync.c +++ b/rsync.c @@ -587,7 +587,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, /* Don't set the creation date on the root folder of an HFS+ volume. */ if (sxp->st.st_ino == 2 && S_ISDIR(sxp->st.st_mode)) flags |= ATTRS_SKIP_CRTIME; - if (sxp != &sx2 && !(flags & (ATTRS_SKIP_MTIME | ATTRS_SKIP_ATIME))) + if (sxp != &sx2) memcpy(&sx2.st, &sxp->st, sizeof sx2.st); if (!(flags & ATTRS_SKIP_MTIME) && !same_mtime(file, &sxp->st, flags & ATTRS_ACCURATE_TIME)) { sx2.st.st_mtime = file->modtime;