X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/53135fe89a7688ff3ef6bb26eb4053de82879036..1848fd6fa125c1603fb12742392d6cb7d87212c0:/flist.c diff --git a/flist.c b/flist.c index b6113738..29d75cab 100644 --- a/flist.c +++ b/flist.c @@ -655,6 +655,9 @@ static struct file_struct *receive_file_entry(struct file_list *flist, 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 @@ -1008,7 +1011,7 @@ static void send_if_directory(int f, struct file_list *flist, /* This function is normally called by the sender, but the receiving side also - * calls it from delete_in_dir() with f set to -1 so that we just construct the + * calls it from get_dirlist() with f set to -1 so that we just construct the * file list in memory without sending it over the wire. Also, get_dirlist() * might call this with f set to -2, which also indicates that local filter * rules should be ignored. */