break out special local mail processing (e.g., mapping to the
[unix-history] / usr / src / usr.sbin / mtree / verify.c
index 062ac61..fad2038 100644 (file)
@@ -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
  *
  * %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>
 #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>
 #include <unistd.h>
 #include <errno.h>
 #include <stdio.h>
@@ -80,17 +81,15 @@ vwalk()
                }
 
                for (ep = level; ep; ep = ep->next)
                }
 
                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;
                            !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 (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;
                                    p->fts_info == FTS_D) {
                                        level = ep->child;
                                        ++specdepth;