(glob): Don't treat \ as quoting in last change if GLOB_NOESCAPE is selected.
authordrepper <drepper>
Sun, 7 Oct 2007 21:00:57 +0000 (21:00 +0000)
committerdrepper <drepper>
Sun, 7 Oct 2007 21:00:57 +0000 (21:00 +0000)
posix/glob.c

index 6ae09ef..3647480 100644 (file)
@@ -455,7 +455,8 @@ glob (pattern, flags, errfunc, pglob)
        }
     }
   else if (filename == pattern
-          || (filename == pattern + 1 && pattern[0] == '\\'))
+          || ((flags & GLOB_NOESCAPE) == 0
+              && filename == pattern + 1 && pattern[0] == '\\'))
     {
       /* "/pattern" or "\\/pattern".  */
       dirname = "/";