From 37def5da976d8dc44c73aaef69c8258ef9ff80d8 Mon Sep 17 00:00:00 2001 From: lukem Date: Mon, 23 Jun 1997 14:34:52 +0000 Subject: [PATCH] Don't incorrectly warn about a subdirectory of 'foo' called 'bar' when there's directory at the same level as 'foo' called 'bar'. (e.g, a definition of usr/obj exists, and a def for usr/bin, but none for usr/obj/bin. don't warn about usr/obj/bin because of the usr/bin entry). Fix from enami tsugutomo in [bin/3365] --- usr.sbin/mtree/verify.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index feaa75ed457b..92b24dcd2c16 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -1,4 +1,4 @@ -/* $NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $ */ +/* $NetBSD: verify.c,v 1.11 1997/06/23 14:34:52 lukem Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $"; +static char rcsid[] = "$NetBSD: verify.c,v 1.11 1997/06/23 14:34:52 lukem Exp $"; #endif #endif /* not lint */ @@ -119,13 +119,13 @@ vwalk() ep->flags |= F_VISIT; if (compare(ep->name, ep, p)) rval = MISMATCHEXIT; - if (ep->flags & F_IGN) - (void)fts_set(t, p, FTS_SKIP); - else if (ep->child && ep->type == F_DIR && + if (!(ep->flags & F_IGN) && + ep->child && ep->type == F_DIR && p->fts_info == FTS_D) { level = ep->child; ++specdepth; - } + } else + (void)fts_set(t, p, FTS_SKIP); break; }