(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
return FNM_NOMATCH;
+ if (*n == '/' && (flags & FNM_FILE_NAME))
+ /* `/' cannot be matched. */
+ return FNM_NOMATCH;
+
not = (*p == '!' || (posixly_correct < 0 && *p == '^'));
if (not)
++p;
if (c == fn)
goto matched;
}
- else if ((flags & FNM_FILE_NAME) && c == '/')
- /* [/] can never match. */
- return FNM_NOMATCH;
else if (c == '[' && *p == ':')
{
/* Leave room for the null. */