Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reverting last change for a re-think.
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
de5f292
..
6642cf2
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-2298,19
+2298,20
@@
static void clean_flist(struct file_list *flist, int strip_root)
int keep, drop;
/* If one is a dir and the other is not, we want to
* keep the dir because it might have contents in the
int keep, drop;
/* If one is a dir and the other is not, we want to
* keep the dir because it might have contents in the
- * list. */
+ * list.
Otherwise keep the first one.
*/
if (S_ISDIR(file->mode)) {
struct file_struct *fp = flist->sorted[j];
if (!S_ISDIR(fp->mode))
keep = i, drop = j;
if (S_ISDIR(file->mode)) {
struct file_struct *fp = flist->sorted[j];
if (!S_ISDIR(fp->mode))
keep = i, drop = j;
- else
+ else {
+ if (am_sender)
+ file->flags |= FLAG_DUPLICATE;
keep = j, drop = i;
keep = j, drop = i;
+ }
} else
keep = j, drop = i;
} else
keep = j, drop = i;
- if (am_sender)
- flist->sorted[drop]->flags |= FLAG_DUPLICATE;
- else {
+ if (!am_sender) {
if (verbose > 1) {
rprintf(FINFO,
"removing duplicate name %s from file list (%d)\n",
if (verbose > 1) {
rprintf(FINFO,
"removing duplicate name %s from file list (%d)\n",