From c8d48faef08fe72320394ebc5dc3d12059392b90 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Oct 2007 18:54:52 +0000 Subject: [BZ #5103] * posix/glob.c (glob): Recognize patterns starting \/. * posix/tst-gnuglob.c (find_file): Handle absolute path names. (main): Add test for pattern starting \/. --- posix/glob.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'posix/glob.c') 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; -- cgit v1.1