From 00f38c1abb9ee4ee58e29b9a5ca84d62a89ff391 Mon Sep 17 00:00:00 2001 From: flz Date: Sat, 3 Apr 2010 10:55:11 +0000 Subject: Fix pkg_delete, check if the file we're trying to delete is a symlink before complaining that it doesn't exist. Typical case would be a leftover library symlink that's left over after the actual library has been removed. Reported by: tabthorpe --- usr.sbin/pkg_install/lib/plist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/pkg_install') diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c index 3c87d62..545b541 100644 --- a/usr.sbin/pkg_install/lib/plist.c +++ b/usr.sbin/pkg_install/lib/plist.c @@ -551,7 +551,7 @@ delete_hierarchy(const char *dir, Boolean ign_err, Boolean nukedirs) char *cp1, *cp2; cp1 = cp2 = strdup(dir); - if (!fexists(dir)) { + if (!fexists(dir) && !issymlink(dir)) { if (!ign_err) warnx("%s '%s' doesn't exist", isdir(dir) ? "directory" : "file", dir); -- cgit v1.1