Reverse sense of fnmatch() to match POSIX.

This commit is contained in:
mycroft 1993-04-10 01:32:25 +00:00
parent 5db0bae112
commit 0152106f20
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ fastfind(pathpart)
if (*p == NULL) { /* fast match success */
found = 1;
if (!globflag ||
fnmatch(pathpart, path, FNM_QUOTE))
!fnmatch(pathpart, path, FNM_QUOTE))
(void)printf("%s\n", path);
break;
}

View File

@ -98,7 +98,7 @@ vwalk()
}
for (ep = level; ep; ep = ep->next)
if (ep->flags & F_MAGIC && fnmatch(ep->name,
if (ep->flags & F_MAGIC && !fnmatch(ep->name,
p->fts_name, FNM_PATHNAME|FNM_QUOTE) ||
!strcmp(ep->name, p->fts_name)) {
ep->flags |= F_VISIT;