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

View file

@ -3,10 +3,11 @@ SnapRAID HISTORY
1.10 2012/6
===========
* If a file is excluded, it prints explicitely which attribute caused the
exclusion.
* Fixed directory inclusion, in case the last rule is an "include" one.
* Fixed very long paths in Windows. We now always use the special '\\?' prefix
to remove the 260 chars limitation.
* If a file is excluded, it prints explicitely which attribute caused the
exclusion.
* Automatically excludes also the temporary copy of content file,
the one with the ".tmp" extension.
* Avoid the Windows system to go in automatic sleep mode when running.

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;