projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38b4bf3
)
fixed directory check to use POSIX macros
author
Holger Schemel
<info@artsoft.org>
Fri, 26 Jun 2015 07:57:19 +0000
(09:57 +0200)
committer
Holger Schemel
<info@artsoft.org>
Fri, 26 Jun 2015 07:57:19 +0000
(09:57 +0200)
src/libgame/misc.c
patch
|
blob
|
history
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index cf387ceb9234585a7ea7a2ed850ddffc3d85fb0e..c568159d41d4adf5c43781c4d2afa40f9f62ba19 100644
(file)
--- 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)