Blame SOURCES/rsync-3.1.2-remove-symlinks.patch
|
|
66c29f |
diff --git a/sender.c b/sender.c
|
|
|
66c29f |
index 03e4aadd..9b432ed9 100644
|
|
|
66c29f |
--- a/sender.c
|
|
|
66c29f |
+++ b/sender.c
|
|
|
66c29f |
@@ -32,6 +32,7 @@ extern int logfile_format_has_i;
|
|
|
66c29f |
extern int want_xattr_optim;
|
|
|
66c29f |
extern int csum_length;
|
|
|
66c29f |
extern int append_mode;
|
|
|
66c29f |
+extern int copy_links;
|
|
|
66c29f |
extern int io_error;
|
|
|
66c29f |
extern int flist_eof;
|
|
|
66c29f |
extern int allowed_lull;
|
|
|
66c29f |
@@ -138,17 +139,16 @@ void successful_send(int ndx)
|
|
|
66c29f |
return;
|
|
|
66c29f |
f_name(file, fname);
|
|
|
66c29f |
|
|
|
66c29f |
- if (do_lstat(fname, &st) < 0) {
|
|
|
66c29f |
+ if ((copy_links ? do_stat(fname, &st) : do_lstat(fname, &st)) < 0) {
|
|
|
66c29f |
failed_op = "re-lstat";
|
|
|
66c29f |
goto failed;
|
|
|
66c29f |
}
|
|
|
66c29f |
|
|
|
66c29f |
- if (S_ISREG(file->mode) /* Symlinks & devices don't need this check: */
|
|
|
66c29f |
- && (st.st_size != F_LENGTH(file) || st.st_mtime != file->modtime
|
|
|
66c29f |
+ if (st.st_size != F_LENGTH(file) || st.st_mtime != file->modtime
|
|
|
66c29f |
#ifdef ST_MTIME_NSEC
|
|
|
66c29f |
|| (NSEC_BUMP(file) && (uint32)st.ST_MTIME_NSEC != F_MOD_NSEC(file))
|
|
|
66c29f |
#endif
|
|
|
66c29f |
- )) {
|
|
|
66c29f |
+ ) {
|
|
|
66c29f |
rprintf(FERROR_XFER, "ERROR: Skipping sender remove for changed file: %s\n", fname);
|
|
|
66c29f |
return;
|
|
|
66c29f |
}
|