summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctm
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-12-04 04:47:31 +0000
committerphk <phk@FreeBSD.org>1994-12-04 04:47:31 +0000
commit40b3f41ba4725d9dda030954fac3023a85a28d8a (patch)
tree38e0c1ca8d0bac03f1e3412bc61560746760d58c /usr.sbin/ctm
parent9cd145015c988390792be6fd2fe6b13536e635b9 (diff)
downloadFreeBSD-src-40b3f41ba4725d9dda030954fac3023a85a28d8a.zip
FreeBSD-src-40b3f41ba4725d9dda030954fac3023a85a28d8a.tar.gz
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.
Diffstat (limited to 'usr.sbin/ctm')
-rw-r--r--usr.sbin/ctm/ctm/ctm_pass3.c17
1 files changed, 10 insertions, 7 deletions
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
}
OpenPOWER on IntegriCloud