}
/* 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;
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;
}
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;