diff options
author | jkh <jkh@FreeBSD.org> | 1998-01-09 14:52:18 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-01-09 14:52:18 +0000 |
commit | 975fdd7c454468c990a58378e791088cb734e75c (patch) | |
tree | 25e3f955aee058a3fb81e41f12eb27f0d23211df | |
parent | 66b7c3e2e0ae7a1716a2373ff89febc5057bb179 (diff) | |
download | FreeBSD-src-975fdd7c454468c990a58378e791088cb734e75c.zip FreeBSD-src-975fdd7c454468c990a58378e791088cb734e75c.tar.gz |
MF22: Additional paranoia in cleanup.
-rw-r--r-- | usr.sbin/pkg_install/lib/pen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c index 36ece65..e34e628 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); } |