diff options
author | jkh <jkh@FreeBSD.org> | 2000-02-19 08:58:54 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2000-02-19 08:58:54 +0000 |
commit | 271b80ec8106c02a935dda5224ad5cadf5b72146 (patch) | |
tree | ca1c2dcf6b5a8db2868a2012f0b8bc3072140ddd /usr.sbin | |
parent | c8f3efebcbd02d389b02f9fc58d46e955c0169e0 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | usr.sbin/pkg_install/lib/file.c | 2 |
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; } |