srogue: make checking directories slightly more portable.
MSVC sys/stat.h doesn't define S_ISDIR().
This commit is contained in:
parent
214c2f6608
commit
e857a2cec6
1 changed files with 1 additions and 1 deletions
|
|
@ -438,7 +438,7 @@ directory_exists(char *dirname)
|
|||
struct stat sb;
|
||||
|
||||
if (stat(dirname, &sb) == 0) /* path exists */
|
||||
return (S_ISDIR (sb.st_mode));
|
||||
return ((sb.st_mode & S_IFMT) == S_IFDIR);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue