summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>2000-02-19 08:58:54 +0000
committerjkh <jkh@FreeBSD.org>2000-02-19 08:58:54 +0000
commit271b80ec8106c02a935dda5224ad5cadf5b72146 (patch)
treeca1c2dcf6b5a8db2868a2012f0b8bc3072140ddd /usr.sbin/pkg_install/lib
parentc8f3efebcbd02d389b02f9fc58d46e955c0169e0 (diff)
downloadFreeBSD-src-271b80ec8106c02a935dda5224ad5cadf5b72146.zip
FreeBSD-src-271b80ec8106c02a935dda5224ad5cadf5b72146.tar.gz
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()
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r--usr.sbin/pkg_install/lib/file.c2
1 files changed, 2 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud