scummvm/backends/fs/posix
Donovan Watteau 858847e1ba BACKENDS: FS: Use stat() fallback for all unexpected dirent d_type values
On systems where dirent provides a `d_type` field, we currently fall
back to stat() only for DT_UNKNOWN values.

Do so for all unexpected `d_type` values instead (that is, anything
different from DT_DIR, DT_REG and DT_LNK).

This is because there's no guarantee that `d_type` will be meaningful
for all OSes and filesystems. One such example is macOS Tiger, where
`d_type` will hold bogus values for the .aiff files of cddafs mount
points (as triggered by MacOSXAudioCDManager). (This bug appears to
have been fixed in cddafs-242.0.1, around the Snow Leopard area.)

When using stat() over the same files, the proper file type is
returned, though. Hence the need for the stat() fallback to be
triggered in more cases than DT_UNKNOWN.

This fixes Indy3 FM-TOWNS music being silent on macOS Tiger, when
playing from the original CD.
2025-03-26 11:50:53 +08:00
..
posix-fs-factory.cpp JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments 2022-01-29 14:15:05 +01:00
posix-fs-factory.h ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
posix-fs.cpp BACKENDS: FS: Use stat() fallback for all unexpected dirent d_type values 2025-03-26 11:50:53 +08:00
posix-fs.h BACKENDS: Allow write streams to be created atomically 2024-10-15 22:45:50 +02:00
posix-iostream.cpp BACKENDS: FS: Refactor StdioStream::makeFromPath 2024-10-01 22:43:38 +02:00
posix-iostream.h BACKENDS: FS: Implement atomic file write for stdio stream backend 2024-10-15 22:45:50 +02:00