summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-04-05 17:26:48 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-04-05 17:26:48 +0000
commit877d2328b86828cecacf54c34ef5d7b874a956cf (patch)
treeaa2a3068f8877ce23d538a4c55c221275f1588c6
parent670ecadd81202b344c208d4ec18a88479034fc5d (diff)
Fix bogus error message. Not a dir can mean *nothing* at all.
Reviewed by aaron@... ;-)
-rw-r--r--usr.sbin/pkg_install/lib/plist.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c
index 28c7a7ea21c..43def33d133 100644
--- a/usr.sbin/pkg_install/lib/plist.c
+++ b/usr.sbin/pkg_install/lib/plist.c
@@ -1,6 +1,6 @@
-/* $OpenBSD: plist.c,v 1.6 2000/03/24 00:20:04 espie Exp $ */
+/* $OpenBSD: plist.c,v 1.7 2000/04/05 17:26:47 espie Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: plist.c,v 1.6 2000/03/24 00:20:04 espie Exp $";
+static const char *rcsid = "$OpenBSD: plist.c,v 1.7 2000/04/05 17:26:47 espie Exp $";
#endif
/*
@@ -375,8 +375,13 @@ delete_package(Boolean ign_err, Boolean nukedirs, package_t *pkg)
case PLIST_DIR_RM:
(void) snprintf(tmp, sizeof(tmp), "%s/%s", Where, p->name);
if (!isdir(tmp)) {
- warnx("attempting to delete file `%s' as a directory\n"
- "this packing list is incorrect - ignoring delete request", tmp);
+ if (fexists(tmp)) {
+ warnx("attempting to delete file `%s' as a directory\n"
+ "this packing list is incorrect - ignoring delete request", tmp);
+ } else {
+ warnx("attempting to delete non-existent directory `%s'\n"
+ "this packing list is incorrect - ignoring delete request", tmp);
+ }
}
else {
if (Verbose)