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 */
|
if (*p == NULL) { /* fast match success */
|
||||||
found = 1;
|
found = 1;
|
||||||
if (!globflag ||
|
if (!globflag ||
|
||||||
fnmatch(pathpart, path, FNM_QUOTE))
|
!fnmatch(pathpart, path, FNM_QUOTE))
|
||||||
(void)printf("%s\n", path);
|
(void)printf("%s\n", path);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ vwalk()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (ep = level; ep; ep = ep->next)
|
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) ||
|
p->fts_name, FNM_PATHNAME|FNM_QUOTE) ||
|
||||||
!strcmp(ep->name, p->fts_name)) {
|
!strcmp(ep->name, p->fts_name)) {
|
||||||
ep->flags |= F_VISIT;
|
ep->flags |= F_VISIT;
|
||||||
|
Loading…
Reference in New Issue
Block a user