From: Holger Schemel Date: Fri, 26 Jun 2015 07:57:19 +0000 (+0200) Subject: fixed directory check to use POSIX macros X-Git-Tag: 4.0.0.0-rc1~165 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d99870c374ff3c25290e15c38a402cbfa3d240e6;p=rocksndiamonds.git fixed directory check to use POSIX macros --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index cf387ceb..c568159d 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -2400,7 +2400,7 @@ DirectoryEntry *readDirectory(Directory *dir) dir->dir_entry->is_directory = (stat(dir->dir_entry->filename, &file_status) == 0 && - (file_status.st_mode & S_IFMT) == S_IFDIR); + S_ISDIR(file_status.st_mode)); return dir->dir_entry; } @@ -2427,7 +2427,7 @@ boolean directoryExists(char *dir_name) struct stat file_status; boolean success = (stat(dir_name, &file_status) == 0 && - (file_status.st_mode & S_IFMT) == S_IFDIR); + S_ISDIR(file_status.st_mode)); #if defined(PLATFORM_ANDROID) if (!success)