diff --git a/src/posix/cocoa/i_system.mm b/src/posix/cocoa/i_system.mm index e284434906..723d49b2fd 100644 --- a/src/posix/cocoa/i_system.mm +++ b/src/posix/cocoa/i_system.mm @@ -252,14 +252,7 @@ int I_FindClose(void* const handle) int I_FindAttr(findstate_t* const fileinfo) { dirent* const ent = fileinfo->namelist[fileinfo->current]; - bool isdir; - - if (DirEntryExists(ent->d_name, &isdir)) - { - return isdir ? FA_DIREC : 0; - } - - return 0; + return (ent->d_type & DT_DIR) ? FA_DIREC : 0; } diff --git a/src/posix/sdl/i_system.cpp b/src/posix/sdl/i_system.cpp index f5ba03c2ad..f96d156865 100644 --- a/src/posix/sdl/i_system.cpp +++ b/src/posix/sdl/i_system.cpp @@ -352,14 +352,7 @@ int I_FindClose (void *handle) int I_FindAttr(findstate_t* const fileinfo) { dirent* const ent = fileinfo->namelist[fileinfo->current]; - bool isdir; - - if (DirEntryExists(ent->d_name, &isdir)) - { - return isdir ? FA_DIREC : 0; - } - - return 0; + return (ent->d_type & DT_DIR) ? FA_DIREC : 0; } void I_PutInClipboard (const char *str)