/*-
- * 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 <sys/param.h>
#include <sys/stat.h>
#include <dirent.h>
#include <fts.h>
+#include <fnmatch.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
}
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;