summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index d1e5e5e..b2dfb69 100644
--- a/dir.c
+++ b/dir.c
@@ -360,7 +360,8 @@ int excluded_from_list(const char *pathname,
if (x->flags & EXC_FLAG_MUSTBEDIR) {
if (!dtype) {
- if (!prefixcmp(pathname, exclude))
+ if (!prefixcmp(pathname, exclude) &&
+ pathname[x->patternlen] == '/')
return to_exclude;
else
continue;