Make missing args governed by protect filters, not hide.
authorWayne Davison <wayned@samba.org>
Fri, 13 Mar 2009 15:49:53 +0000 (08:49 -0700)
committerMatt McCutchen <matt@mattmccutchen.net>
Fri, 13 Nov 2009 18:08:17 +0000 (13:08 -0500)
flist.c
generator.c

diff --git a/flist.c b/flist.c
index f7bd1aa..f0e557e 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -2153,7 +2153,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                }
 
                /* A dot-dir should not be excluded! */
-               if (name_type != DOTDIR_NAME
+               if (name_type != DOTDIR_NAME && st.st_mode != 0
                 && is_excluded(fbuf, S_ISDIR(st.st_mode) != 0, ALL_FILTERS))
                        continue;
 
index ec33d5a..d14cafa 100644 (file)
@@ -98,7 +98,7 @@ extern char *backup_dir;
 extern char *backup_suffix;
 extern int backup_suffix_len;
 extern struct file_list *cur_flist, *first_flist, *dir_flist;
-extern struct filter_list_struct daemon_filter_list;
+extern struct filter_list_struct filter_list, daemon_filter_list;
 
 int ignore_perishable = 0;
 int non_perishable_cnt = 0;
@@ -1375,6 +1375,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
        }
 
        if (delete_missing_args && file->mode == 0) {
+               if (filter_list.head && check_filter(&filter_list, FINFO, fname, is_dir) < 0)
+                       return;
                if (statret == 0)
                        delete_item(fname, sx.st.st_mode, del_opts);
                return;