summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-03-28 17:32:48 +0200
committerJim Meyering <meyering@redhat.com>2010-03-28 20:59:00 +0200
commitda3d9ebff4400a131448b1548bc5e12d8e701ae3 (patch)
treec8b4c86ac152700138e942891597cc566c7c9d01 /lib
parentc03209e3bb4a64a4ceacf3c02e6ba69cb1457d4d (diff)
downloadgrep-da3d9ebff4400a131448b1548bc5e12d8e701ae3.tar.gz
grep -r: fix --include with non-globs
* lib/savedir.c (savedir): Fix logic error. Introduced by commit bf3bd92c, "build: adapt to the newer exclude API we now get from gnulib" * tests/include-exclude: Test for this bug by exercising --include, too. * NEWS (Bug fixes): Mention it. Reported by Philipp Kohlbecher in http://savannah.gnu.org/bugs/?29358
Diffstat (limited to 'lib')
-rw-r--r--lib/savedir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/savedir.c b/lib/savedir.c
index 94e5f121..53f8c7be 100644
--- a/lib/savedir.c
+++ b/lib/savedir.c
@@ -112,7 +112,7 @@ savedir (const char *dir, off_t name_size, struct exclude *included_patterns,
&& !isdir1 (dir, dp->d_name))
{
if (included_patterns
- && !excluded_file_name (included_patterns, dp->d_name))
+ && excluded_file_name (included_patterns, dp->d_name))
continue;
if (excluded_patterns
&& excluded_file_name (excluded_patterns, dp->d_name))