aboutsummaryrefslogtreecommitdiff
path: root/posix/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/glob.c')
-rw-r--r--posix/glob.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/posix/glob.c b/posix/glob.c
index 6d8a891..6ae09ef 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -454,9 +454,10 @@ glob (pattern, flags, errfunc, pglob)
dirlen = 0;
}
}
- else if (filename == pattern)
+ else if (filename == pattern
+ || (filename == pattern + 1 && pattern[0] == '\\'))
{
- /* "/pattern". */
+ /* "/pattern" or "\\/pattern". */
dirname = "/";
dirlen = 1;
++filename;