From: Wayne Davison Date: Sat, 2 Oct 2021 18:39:41 +0000 (-0700) Subject: Check ro in set_create_time() for Cygwin too. X-Git-Tag: v3.2.4pre1~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f41cdc75a184b73eb81dd251c12ef6e2998e6005;p=thirdparty%2Frsync.git Check ro in set_create_time() for Cygwin too. --- diff --git a/syscall.c b/syscall.c index bf0de8ba..fe79fe01 100644 --- a/syscall.c +++ b/syscall.c @@ -427,13 +427,14 @@ time_t get_create_time(const char *path, STRUCT_STAT *stp) int set_create_time(const char *path, time_t crtime) { + if (dry_run) return 0; + RETURN_ERROR_IF_RO_OR_LO; + + { #ifdef HAVE_GETATTRLIST struct attrlist attrList; struct timespec ts; - if (dry_run) return 0; - RETURN_ERROR_IF_RO_OR_LO; - ts.tv_sec = crtime; ts.tv_nsec = 0; @@ -462,6 +463,7 @@ int set_create_time(const char *path, time_t crtime) CloseHandle(handle); return ok ? 0 : -1; #endif + } } #endif