From: Wayne Davison Date: Sun, 12 Jul 2015 20:25:37 +0000 (-0700) Subject: Avoid --remove-sent-file issue for non-regular files. X-Git-Tag: v3.1.2pre1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfbcc4f7ec2aed14e87ef2ac5a4f12d2a96ffe56;p=thirdparty%2Frsync.git Avoid --remove-sent-file issue for non-regular files. --- diff --git a/sender.c b/sender.c index 5adc2fd8..d20ff4e1 100644 --- a/sender.c +++ b/sender.c @@ -143,11 +143,12 @@ void successful_send(int ndx) goto failed; } - if (st.st_size != F_LENGTH(file) || st.st_mtime != file->modtime + if (S_ISREG(file->mode) /* Symlinks & devices don't need this check: */ + && (st.st_size != F_LENGTH(file) || st.st_mtime != file->modtime #ifdef ST_MTIME_NSEC || (NSEC_BUMP(file) && (uint32)st.ST_MTIME_NSEC != F_MOD_NSEC(file)) #endif - ) { + )) { rprintf(FERROR_XFER, "ERROR: Skipping sender remove for changed file: %s\n", fname); return; }