X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/275bb093e32ffde52d8194e2a10ce5c6c2553762..2bade5508d05fe9e4bec6842516388ef51815f52:/usr/src/usr.sbin/mtree/verify.c diff --git a/usr/src/usr.sbin/mtree/verify.c b/usr/src/usr.sbin/mtree/verify.c index 062ac61130..fad2038813 100644 --- a/usr/src/usr.sbin/mtree/verify.c +++ b/usr/src/usr.sbin/mtree/verify.c @@ -1,18 +1,19 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. * * %sccs.include.redist.c% */ #ifndef lint -static char sccsid[] = "@(#)verify.c 5.10 (Berkeley) %G%"; +static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) %G%"; #endif /* not lint */ #include #include #include #include +#include #include #include #include @@ -80,17 +81,15 @@ vwalk() } for (ep = level; ep; ep = ep->next) - if (ep->flags & F_MAGIC && fnmatch(ep->name, - p->fts_name, FNM_PATHNAME|FNM_QUOTE) || + if (ep->flags & F_MAGIC && + !fnmatch(ep->name, p->fts_name, FNM_PATHNAME) || !strcmp(ep->name, p->fts_name)) { ep->flags |= F_VISIT; - if (ep->flags & F_IGN) { - (void)fts_set(t, p, FTS_SKIP); - continue; - } if (compare(ep->name, ep, p)) rval = MISMATCHEXIT; - if (ep->child && ep->type == F_DIR && + if (ep->flags & F_IGN) + (void)fts_set(t, p, FTS_SKIP); + else if (ep->child && ep->type == F_DIR && p->fts_info == FTS_D) { level = ep->child; ++specdepth;