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
Made clean_flist() only duplicate *_DIR_* flags on a dropped dir
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
aef150d
..
57d1596
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-1608,7
+1608,7
@@
static void send1extra(int f, struct file_struct *file, struct file_list *flist)
if (is_dot_dir) {
STRUCT_STAT st;
if (is_dot_dir) {
STRUCT_STAT st;
- if (link_stat(fbuf, &st,
copy_dirlinks
) != 0) {
+ if (link_stat(fbuf, &st,
1
) != 0) {
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "link_stat %s failed",
full_fname(fbuf));
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "link_stat %s failed",
full_fname(fbuf));
@@
-1905,7
+1905,7
@@
struct file_list *send_file_list(int f, int argc, char *argv[])
if (fn != fbuf)
memmove(fbuf, fn, len + 1);
if (fn != fbuf)
memmove(fbuf, fn, len + 1);
- if (link_stat(fbuf, &st, copy_dirlinks) != 0) {
+ if (link_stat(fbuf, &st, copy_dirlinks
|| is_dot_dir
) != 0) {
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "link_stat %s failed",
full_fname(fbuf));
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "link_stat %s failed",
full_fname(fbuf));
@@
-2392,6
+2392,8
@@
static void clean_flist(struct file_list *flist, int strip_root)
else {
if (am_sender)
file->flags |= FLAG_DUPLICATE;
else {
if (am_sender)
file->flags |= FLAG_DUPLICATE;
+ else /* Make sure we don't lose vital flags. */
+ fp->flags |= file->flags & (FLAG_TOP_DIR|FLAG_XFER_DIR);
keep = j, drop = i;
}
} else
keep = j, drop = i;
}
} else
@@
-2403,11
+2405,6
@@
static void clean_flist(struct file_list *flist, int strip_root)
"removing duplicate name %s from file list (%d)\n",
f_name(file, fbuf), drop + flist->ndx_start);
}
"removing duplicate name %s from file list (%d)\n",
f_name(file, fbuf), drop + flist->ndx_start);
}
- /* Make sure we don't lose track of a user-specified
- * top directory. */
- flist->sorted[keep]->flags |= flist->sorted[drop]->flags
- & (FLAG_TOP_DIR|FLAG_XFER_DIR);
-
clear_file(flist->sorted[drop]);
}
clear_file(flist->sorted[drop]);
}