1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/vfs
Benjamin Valentin 4295104866 vfs: fix dir detection in vfs_sysop_stat_from_fstat()
`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.
2022-05-08 23:04:26 +02:00
..
Kconfig sys/vfs: add vfs_default pseudo-module 2022-02-14 13:04:37 +01:00
Makefile sys/vfs: A virtual file system (VFS) layer for RIOT 2017-03-07 17:59:57 +01:00
vfs_stdio.c stdio/vfs: generalized VFS mapping for STDIO 2018-08-30 11:14:59 +02:00
vfs.c vfs: fix dir detection in vfs_sysop_stat_from_fstat() 2022-05-08 23:04:26 +02:00