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

View file

@ -1,6 +1,11 @@
SnapRAID HISTORY SnapRAID HISTORY
================ ================
1.11 2012/7
===========
* Fixed again directories inclusion. Exclusion rules for directories were
ignored.
1.10 2012/6 1.10 2012/6
=========== ===========
* Fixed directory inclusion, in case the last rule is an "include" one. * Fixed directory inclusion, in case the last rule is an "include" one.

View file

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65]) AC_PREREQ([2.65])
AC_INIT([snapraid], [1.10], [], [], [http://snapraid.sourceforge.net]) AC_INIT([snapraid], [1.11], [], [], [http://snapraid.sourceforge.net])
AM_INIT_AUTOMAKE([foreign no-dependencies -Wall]) AM_INIT_AUTOMAKE([foreign no-dependencies -Wall])
AC_CONFIG_SRCDIR([snapraid.c]) AC_CONFIG_SRCDIR([snapraid.c])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])

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); ret = filter_recurse(filter, sub, is_dir);
if (ret > 0) { if (ret > 0) {
/* include the file */ /* include the file */
direction = 1; return 0;
break;
} else if (ret < 0) { } else if (ret < 0) {
/* exclude the file */ /* exclude the file */
direction = -1; return -1;
break;
} else { } else {
/* default is opposite of the last filter */ /* default is opposite of the last filter */
direction = -filter->direction; direction = -filter->direction;