=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- src/usr.bin/cvs/file.c 2005/03/05 03:00:27 1.55 +++ src/usr.bin/cvs/file.c 2005/03/05 17:19:50 1.56 @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.55 2005/03/05 03:00:27 jfb Exp $ */ +/* $OpenBSD: file.c,v 1.56 2005/03/05 17:19:50 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -586,8 +586,7 @@ } } - if (!(flags & CF_RECURSE) || - ((flags & CF_KNOWN) && (cf->cf_cvstat == CVS_FST_UNKNOWN))) + if ((flags & CF_KNOWN) && (cf->cf_cvstat == CVS_FST_UNKNOWN)) return (0); fd = open(fpath, O_RDONLY); @@ -627,6 +626,13 @@ if ((flags & CF_NOSYMS) && (ent->d_type == DT_LNK)) continue; + + if (!(flags & CF_RECURSE) && (ent->d_type == DT_DIR)) { + if (cdp->cd_ent != NULL) + (void)cvs_ent_remove(cdp->cd_ent, + ent->d_name); + continue; + } snprintf(pbuf, sizeof(pbuf), "%s/%s", fpath, ent->d_name);