Fixed directories exclusion.

This commit is contained in:
Andrea Mazzoleni 2012-07-03 21:51:50 +02:00
parent 7ee0c0f5ef
commit 97b0464d75
3 changed files with 8 additions and 5 deletions

6
elem.c
View file

@ -163,12 +163,10 @@ static int filter_element(tommy_list* filterlist, const char* sub, int is_dir)
ret = filter_recurse(filter, sub, is_dir);
if (ret > 0) {
/* include the file */
direction = 1;
break;
return 0;
} else if (ret < 0) {
/* exclude the file */
direction = -1;
break;
return -1;
} else {
/* default is opposite of the last filter */
direction = -filter->direction;