summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index be537ca236..b26eda4c38 100644
--- a/dir.c
+++ b/dir.c
@@ -981,6 +981,8 @@ glob_helper(path, sub, flags, func, arg)
if (recursive) {
if (strcmp(".", dp->d_name) == 0 || strcmp("..", dp->d_name) == 0)
continue;
+ if (fnmatch("*", dp->d_name, flags) != 0)
+ continue;
buf = ALLOC_N(char, strlen(base)+NAMLEN(dp)+strlen(m)+6);
sprintf(buf, "%s%s%s", base, (BASE) ? "/" : "", dp->d_name);
if (lstat(buf, &st) < 0) {