mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:57:35 +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
|
@ -28,6 +28,7 @@ struct DirectoryEntry {
|
|||
ByteString name;
|
||||
ino_t inode_number;
|
||||
|
||||
static Type directory_entry_type_from_stat(mode_t st_mode);
|
||||
static DirectoryEntry from_dirent(dirent const&);
|
||||
static DirectoryEntry from_stat(DIR*, dirent const&);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue