Reverse sense of fnmatch() to match POSIX.
This commit is contained in:
parent
5db0bae112
commit
0152106f20
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user