=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/update.c,v retrieving revision 1.157 retrieving revision 1.158 diff -u -r1.157 -r1.158 --- src/usr.bin/cvs/update.c 2009/02/21 14:50:53 1.157 +++ src/usr.bin/cvs/update.c 2009/03/21 11:16:28 1.158 @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.157 2009/02/21 14:50:53 joris Exp $ */ +/* $OpenBSD: update.c,v 1.158 2009/03/21 11:16:28 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -246,6 +246,12 @@ if (cvs_server_active == 1 && !strcmp(cf->file_name, ".")) return; + entlist = cvs_ent_open(cf->file_path); + if (!TAILQ_EMPTY(&(entlist->cef_ent))) { + isempty = 0; + goto prune_it; + } + if (fstat(cf->fd, &st) == -1) fatal("cvs_update_leavedir: %s", strerror(errno)); @@ -276,13 +282,8 @@ continue; } - if (!strcmp(dp->d_name, CVS_PATH_CVSDIR)) { - entlist = cvs_ent_open(cf->file_path); - if (!TAILQ_EMPTY(&(entlist->cef_ent))) - isempty = 0; - } else { + if (strcmp(dp->d_name, CVS_PATH_CVSDIR)) isempty = 0; - } if (isempty == 0) break; @@ -296,6 +297,7 @@ xfree(buf); +prune_it: if ((isempty == 1 && prune_dirs == 1) || (cvs_server_active == 1 && cvs_cmdop == CVS_OP_CHECKOUT)) { /* XXX */