From ff6f5bfb912086314c9c46e6021ea21cd3633a2a Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Sat, 19 Feb 2000 08:58:54 +0000 Subject: [PATCH] 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(+) diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index b25dc9ec7dc..b39ecf3b8f9 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; }