mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 06:53:52 +01:00
`vfs_sysop_stat_from_fstat()` is a fallback implementation of `stat()` based on `fstat()`. It will open a file and call `fstat()`. This fails if the target is not a file but a directory, which means that directories are not recognized as such. To fix this, try to open the path as a directory if opening it as a file fails. If this succeeds, set the `S_IFDIR` flag.