From 1314830153a3085d9837765031c601087e498916 Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 5 Apr 2000 17:26:47 +0000 Subject: [PATCH] Fix bogus error message. Not a dir can mean *nothing* at all. Reviewed by aaron@... ;-) --- usr.sbin/pkg_install/lib/plist.c | 13 +++++++++---- 1 file 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) -- 2.20.1