From 271b80ec8106c02a935dda5224ad5cadf5b72146 Mon Sep 17 00:00:00 2001 From: jkh Date: Sat, 19 Feb 2000 08:58:54 +0000 Subject: 1. If checking for directory-ness, check "dir" and "dir/" to catch the case where we have a symlink pointing at a dir. 2. Restore stomped character before returning in make_hierarchy() --- usr.sbin/pkg_install/lib/file.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.sbin/pkg_install/lib') diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index b25dc9e..b39ecf3 100644 --- a/usr.sbin/pkg_install/lib/file.c +++ b/usr.sbin/pkg_install/lib/file.c @@ -49,6 +49,8 @@ isdir(char *fname) if (lstat(fname, &sb) != FAIL && S_ISDIR(sb.st_mode)) return TRUE; + else if (lstat(strconcat(fname, "/"), &sb) != FAIL && S_ISDIR(sb.st_mode)) + return TRUE; else return FALSE; } -- cgit v1.1