--delete option does not always work
Wayne Davison
wayned at samba.org
Wed Apr 27 19:21:06 GMT 2005
OK, I had a free moment to work up a fix, and here it is. It was
pretty simple.
..wayne..
-------------- next part --------------
--- flist.c 30 Mar 2005 17:31:35 -0000 1.291
+++ flist.c 27 Apr 2005 19:14:17 -0000
@@ -655,6 +655,9 @@ static struct file_struct *receive_file_
if (flags & XMIT_TOP_DIR) {
in_del_hier = 1;
del_hier_name_len = file->dir.depth == 0 ? 0 : l1 + l2;
+ if (relative_paths && del_hier_name_len > 2
+ && basename_len == 1+1 && *basename == '.')
+ del_hier_name_len -= 2;
file->flags |= FLAG_TOP_DIR | FLAG_DEL_HERE;
} else if (in_del_hier) {
if (!relative_paths || !del_hier_name_len
More information about the rsync
mailing list