fix(libc): fail chdir, remove, opendir and fopen through a regular file with ENOTDIR on Windows #8200
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8200"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T02:24:40Z.
What
Uses
NotFoundError_nid_no_patchfrom the previous change (Depends on #8195, which defines it; until that is merged this branch also carries its commit) on the not-found paths ofchdir_nid_postfix,remove_nid_postfix,opendir_nid_postfix,fopen_nid_postfixandfreopen_nid_postfix: ENOENT becomes ENOTDIR when the nearest existing ancestor of the host path is not a directory. No extra host call on success.Part of #8194 (the same bug in more calls; #8195 closes the issue).
Overlap: the sibling PR for chmod, truncate, utimes and rename adds cases to the same loop of
GuestFilesystem.cpp; whichever lands second rebases.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on upstream/main + the previous change + this commit:
guest_filesystem: fails without the changes toFilesystem.cpp,Directory.cpp,General.cppandFileAndHeap.cpp, passes with them;guest_working_directory,guest_directory,guest_path_case,guest_directory_bufferandguest_append_streamspass.python tools/check_conventions.py --base upstream/main: passes.file/) is not changed.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T02:30:12Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libc/src/General.cppcore/libs/tests/GuestFilesystem.cppcore/libs/prx/libc/src/General.cppcore/libs/prx/libc/src/General.cppcore/libs/prx/libc/src/FileAndHeap.cppcore/libs/prx/libc/src/FileAndHeap.cppcore/libs/prx/libc/src/General.cppcore/libs/tests/GuestFilesystem.cppcore/libs/prx/libc/src/FileAndHeap.cppcore/libs/prx/libc/src/General.cppcore/libs/prx/libc/src/FileAndHeap.cppcore/libs/prx/libc/src/Filesystem.cppcore/libs/tests/GuestFilesystem.cpp