Open mateusz-bloch opened 1 year ago
Please note that:
jffs2
there and /dev
is dummyfs
; currently it's not possible to test other FSes on ia32
due to phoenix-rtos/phoenix-rtos-project#114)I managed to track down the bug to the resolve_path
function in libphoenix. According to Open Group it should set errno
to ENOTDIR
when:
[...] the file_name argument contains at least one non-\<slash> character and ends with one or more trailing \<slash> characters and the last pathname component names an existing file that is neither a directory nor a symbolic link to a directory.
Instead, the function simply ignores trailing slashes, so it cannot behave correctly.
stat() completion successful and set wrong errno, when a component of the path is existing regular file, not a directory
Tested between ia32-generic and host-generic
Code to reproduction:
Outcome from ia32-generic:
Outcome from host-generic:
Documentation: