From cac17432031328631163dacfe1d5c2231eac9f1b Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 9 Jan 1998 14:52:18 +0000 Subject: MF22: Additional paranoia in cleanup. --- usr.sbin/pkg_install/lib/pen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c index 36ece65c151d..e34e6286efbf 100644 --- a/usr.sbin/pkg_install/lib/pen.c +++ b/usr.sbin/pkg_install/lib/pen.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: pen.c,v 1.24 1997/02/22 16:09:50 peter Exp $"; + "$Id: pen.c,v 1.25 1997/10/08 07:48:12 charnier Exp $"; #endif /* @@ -121,7 +121,7 @@ leave_playpen(char *save) if (Previous[0] && chdir(Previous) == FAIL) cleanup(0), errx(2, "can't chdir back to '%s'", Previous); else if (Current[0] && strcmp(Current, Previous)) { - if (vsystem("rm -rf %s", Current)) + if (Current[0] == '/' && vsystem("rm -rf %s", Current)) warnx("couldn't remove temporary dir '%s'", Current); strcpy(Current, Previous); } -- cgit v1.3