diff options
author | flz <flz@FreeBSD.org> | 2010-04-03 10:55:11 +0000 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2010-04-03 10:55:11 +0000 |
commit | 00f38c1abb9ee4ee58e29b9a5ca84d62a89ff391 (patch) | |
tree | 27bee47647b258e5086144cbf77878f0576f8d76 /usr.sbin/pkg_install | |
parent | 5b3e4a4ae87b9d269a42ec394518307ea8148de7 (diff) | |
download | FreeBSD-src-00f38c1abb9ee4ee58e29b9a5ca84d62a89ff391.zip FreeBSD-src-00f38c1abb9ee4ee58e29b9a5ca84d62a89ff391.tar.gz |
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
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r-- | usr.sbin/pkg_install/lib/plist.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |