Reverse sense of fnmatch() to match POSIX.
This commit is contained in:
parent
287109896b
commit
1dfe1fa9f0
|
@ -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