diff --git a/src/posix/cocoa/i_system.mm b/src/posix/cocoa/i_system.mm index bdc9038af..66f51eea6 100644 --- a/src/posix/cocoa/i_system.mm +++ b/src/posix/cocoa/i_system.mm @@ -254,14 +254,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 2364085bd..88b2748c7 100644 --- a/src/posix/sdl/i_system.cpp +++ b/src/posix/sdl/i_system.cpp @@ -366,14 +366,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)