git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bdfc296
)
Fix --remove-source-files sanity check w/--copy-links the right way.
author
Wayne Davison
<wayned@samba.org>
Sat, 16 Mar 2019 16:09:09 +0000
(09:09 -0700)
committer
Wayne Davison
<wayned@samba.org>
Sat, 16 Mar 2019 16:09:09 +0000
(09:09 -0700)
Fixes bug #10494.
sender.c
patch
|
blob
|
history
diff --git
a/sender.c
b/sender.c
index 03e4aadd8096a65d5198bbd8a2f47afed89b152f..9b432ed9f8b5575d0a68df5e40b5769cc269acd4 100644
(file)
--- a/
sender.c
+++ b/
sender.c
@@
-32,6
+32,7
@@
extern int logfile_format_has_i;
extern int want_xattr_optim;
extern int csum_length;
extern int append_mode;
extern int want_xattr_optim;
extern int csum_length;
extern int append_mode;
+extern int copy_links;
extern int io_error;
extern int flist_eof;
extern int allowed_lull;
extern int io_error;
extern int flist_eof;
extern int allowed_lull;
@@
-138,17
+139,16
@@
void successful_send(int ndx)
return;
f_name(file, fname);
return;
f_name(file, fname);
- if (
do_lstat(fname, &st
) < 0) {
+ if (
(copy_links ? do_stat(fname, &st) : do_lstat(fname, &st)
) < 0) {
failed_op = "re-lstat";
goto failed;
}
failed_op = "re-lstat";
goto failed;
}
- if (S_ISREG(file->mode) /* Symlinks & devices don't need this check: */
- && (st.st_size != F_LENGTH(file) || st.st_mtime != file->modtime
+ if (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
#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;
}
rprintf(FERROR_XFER, "ERROR: Skipping sender remove for changed file: %s\n", fname);
return;
}