If we unduplicate '.', make sure we also copy FLAG_DEL_HERE (in
authorWayne Davison <wayned@samba.org>
Fri, 27 May 2005 18:04:04 +0000 (18:04 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 27 May 2005 18:04:04 +0000 (18:04 +0000)
addition to FLAG_TOP_DIR), so that the unduplication of a real
dir and an implied dir (implied by --relative) works right.

flist.c

diff --git a/flist.c b/flist.c
index 5058cc5..c342539 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1524,8 +1524,9 @@ static void clean_flist(struct file_list *flist, int strip_root, int no_dups)
                        }
                        /* Make sure that if we unduplicate '.', that we don't
                         * lose track of a user-specified top directory. */
-                       if (flist->files[drop]->flags & FLAG_TOP_DIR)
-                               flist->files[keep]->flags |= FLAG_TOP_DIR;
+                       j = flist->files[drop]->flags & (FLAG_TOP_DIR|FLAG_DEL_HERE);
+                       if (j)
+                               flist->files[keep]->flags |= j;
 
                        clear_file(drop, flist);