Fixed directory inclusion if the last rule is "include".

This commit is contained in:
Andrea Mazzoleni 2012-06-29 20:35:43 +02:00
parent 9bbf375975
commit 7c2b48fbb4
2 changed files with 9 additions and 2 deletions

6
elem.c
View file

@ -176,6 +176,12 @@ static int filter_element(tommy_list* filterlist, const char* sub, int is_dir)
}
}
/* directories are always included by default, otherwise we cannot apply rules */
/* to the contained files */
if (is_dir)
return 0;
/* files are excluded/included depending of the last rule processed */
if (direction < 0)
return -1;