From 40b3f41ba4725d9dda030954fac3023a85a28d8a Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 4 Dec 1994 04:47:31 +0000 Subject: Cannot use rmdir() for 'FR' because mkCTM doesn't sort the directories in -depth order for us. cvs-cur.0018.gz is a good example. --- usr.sbin/ctm/ctm/ctm_pass3.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'usr.sbin/ctm') diff --git a/usr.sbin/ctm/ctm/ctm_pass3.c b/usr.sbin/ctm/ctm/ctm_pass3.c index 919c69d..3767b14 100644 --- a/usr.sbin/ctm/ctm/ctm_pass3.c +++ b/usr.sbin/ctm/ctm/ctm_pass3.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: ctm_pass3.c,v 1.5 1994/11/26 08:57:42 phk Exp $ + * $Id: ctm_pass3.c,v 1.6 1994/11/27 16:01:29 bde Exp $ * */ @@ -158,17 +158,20 @@ Pass3(FILE *fd) continue; } if(!strcmp(sp->Key,"FR")) { - if (0 == unlink(name)) - continue; + if (0 != unlink(name)) { + fprintf(stderr,"<%s> unlink failed\n",name); + WRONG + } + continue; } if(!strcmp(sp->Key,"DR")) { - if (0 == rmdir(name)) - continue; -#ifdef NOTDEF + /* + * We cannot use rmdir() because we do not get the directories + * in '-depth' order (cvs-cur.0018.gz for examples) + */ sprintf(buf,"rm -rf %s",name); system(buf); continue; -#endif } WRONG } -- cgit v1.1