use S_ISDIR

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25228 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-05-25 23:44:41 +00:00
parent 2e992827d9
commit dccd572c45

View File

@@ -70,7 +70,7 @@ dir_init(hx509_context context,
return ENOENT;
}
if ((sb.st_mode & S_IFDIR) == 0) {
if (!S_ISDIR(sb.st_mode)) {
hx509_set_error_string(context, 0, ENOTDIR,
"%s is not a directory", residue);
return ENOTDIR;