dnasdw / 3dstool

An all-in-one tool for extracting/creating 3ds roms.
MIT License
335 stars 35 forks source link

Handle cases where readdir() returns DT_UNKNOWN in romfs.cpp #23

Closed badda71 closed 4 years ago

badda71 commented 4 years ago

On some systems, readdir() always returns DT_UNKNOWN. This needs to be handled by calling stat() explicitly. See man 3 readdir: "Currently, only some filesystems (among them: Btrfs, ext2, ext3, and ext4) have full support for returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN."