diff options
Diffstat (limited to 'posix/glob.c')
-rw-r--r-- | posix/glob.c | 5 |
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; |