mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-18 22:37:49 -04:00
Avoid --remove-sent-file issue for non-regular files.
This commit is contained in:
5
sender.c
5
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user