Support --crtimes on Cygwin.
[rsync.git] / generator.c
index a890bdc3c5b7e9577289d9837deffe1055f1f7d4..dc4570931002e2d630c4cac51e8db01d77492a25 100644 (file)
@@ -399,7 +399,7 @@ static inline int any_time_differs(stat_x *sxp, struct file_struct *file, UNUSED
 #ifdef SUPPORT_CRTIMES
        if (!differs && crtimes_ndx) {
                if (sxp->crtime == 0)
-                       sxp->crtime = get_create_time(fname);
+                       sxp->crtime = get_create_time(fname, &sxp->st);
                differs = !same_time(sxp->crtime, 0, F_CRTIME(file), 0);
        }
 #endif
@@ -525,7 +525,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
 #ifdef SUPPORT_CRTIMES
                if (crtimes_ndx) {
                        if (sxp->crtime == 0)
-                               sxp->crtime = get_create_time(fnamecmp);
+                               sxp->crtime = get_create_time(fnamecmp, &sxp->st);
                        if (!same_time(sxp->crtime, 0, F_CRTIME(file), 0))
                                iflags |= ITEM_REPORT_CRTIME;
                }