summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 0184b1863a..064609c8d8 100644
--- a/dir.c
+++ b/dir.c
@@ -1229,7 +1229,7 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
}
memcpy(buf, p, m-p);
buf[m-p] = '\0';
- tmp->type = magic > MAGICAL ? MAGICAL : magic;
+ tmp->type = magic > MAGICAL ? MAGICAL : magic > non_magic ? magic : PLAIN;
tmp->str = buf;
if (*m) {
dirsep = 1;