From c27f25922e9f59e439228a3c3e0c38342899a80f Mon Sep 17 00:00:00 2001 From: David Dykstra Date: Tue, 9 Mar 1999 21:55:16 +0000 Subject: [PATCH] Check for EINVAL from a rename error call in addition to ENOENT because David Campbell reported that that helps data be received onto a windows box running cygwin b19. --- rsync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rsync.c b/rsync.c index 87a8056b..d7f2d3ce 100644 --- a/rsync.c +++ b/rsync.c @@ -242,7 +242,8 @@ int make_backup(char *fname) slprintf(fnamebak,sizeof(fnamebak),"%s%s",fname,backup_suffix); if (do_rename(fname,fnamebak) != 0) { - if (errno != ENOENT) { + /* cygwin (at least version b19) reports EINVAL */ + if (errno != ENOENT && errno != EINVAL) { rprintf(FERROR,"rename %s %s : %s\n",fname,fnamebak,strerror(errno)); return 0; } -- 2.34.1