mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:07:43 +00:00
LibCore: Fall back to fstat if readdir doesn't produce a valid file type
Per POSIX, It is valid for dirent structures obtained via readdir to not name a valid type.
This commit is contained in:
parent
48e848a9fd
commit
7c9ca8baab
3 changed files with 16 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace Core {
|
||||
|
||||
static DirectoryEntry::Type directory_entry_type_from_stat(mode_t st_mode)
|
||||
DirectoryEntry::Type DirectoryEntry::directory_entry_type_from_stat(mode_t st_mode)
|
||||
{
|
||||
switch (st_mode & S_IFMT) {
|
||||
case S_IFIFO:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue