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()
This commit is contained in:
Jordan K. Hubbard 2000-02-19 08:58:54 +00:00
parent 95452c412e
commit ff6f5bfb91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57331

View File

@ -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;
}