You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
Some POSIX functions (e.g. open, unlink, opendir, mkdir) requires setting errno to ENOTDIR rather than ENOENT when "a component of the path prefix names an existing file that is neither a directory nor a symbolic link to a directory". They are implemented by function _FAT_directory_entryFromPath in libfat, which does not provide right information to distinguish the accurate errors:
if (found && !(entry->entryData[DIR_ENTRY_attributes] & ATTRIB_DIR) && (nextPathPosition != NULL)) {
// Make sure that we aren't trying to follow a file instead of a directory in the path
found = false;
}
Note that the implementation like _FAT_open_r is not sufficient, because it only tests the last component (not prefix) of the path:
Some POSIX functions (e.g.
open
,unlink
,opendir
,mkdir
) requires settingerrno
toENOTDIR
rather thanENOENT
when "a component of the path prefix names an existing file that is neither a directory nor a symbolic link to a directory". They are implemented by function_FAT_directory_entryFromPath
in libfat, which does not provide right information to distinguish the accurate errors:Note that the implementation like
_FAT_open_r
is not sufficient, because it only tests the last component (not prefix) of the path:The text was updated successfully, but these errors were encountered: