aboutsummaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 1086658f0d..0f70770ce6 100644
--- a/dir.c
+++ b/dir.c
@@ -267,7 +267,7 @@ fnmatch(pat, string, flags)
test = escape && c == '\\' ? pat+1 : pat;
while (*s) {
- if ((c == '[' || Compare(s, test) == 0) &&
+ if ((c == '?' || c == '[' || Compare(s, test) == 0) &&
!fnmatch(pat, s, flags | FNM_DOTMATCH))
return 0;
else if (ISDIRSEP(*s))
@@ -288,7 +288,7 @@ fnmatch(pat, string, flags)
case '\\':
if (escape && pat[1]
#if defined DOSISH
- && strchr("*?[\\", pat[1])
+ && strchr("*?[]\\", pat[1])
#endif
) {
c = *++pat;