fix(libkernel): fail chmod, truncate, utimes and rename through a regular file with ENOTDIR on Windows #8199
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8199"
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:35Z.
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 ofchmod_nid_postfix,sceKernelTruncate_nid_postfixandsceKernelUtimes_nid_postfix, and inRenameGuestPath_nid_no_patch(libcrenameandsceKernelRename): ENOENT becomes ENOTDIR when the nearest existing ancestor of the source is not a directory, or of the destination while the source exists.GuestFilesystem.cpp:735expected ENOENT fortruncatebelow a regular file; it now expects ENOTDIR.Part of #8194 (the same bug in more calls; #8195 closes the issue).
Overlap: this branch and the
-3branch (chdir, remove, opendir, fopen) both add cases to the same loop ofGuestFilesystem.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 toStdio.cppandRename.cpp, passes with them;guest_file_timestamp,guest_path_case,guest_directorypass.python tools/check_conventions.py --base upstream/main: passes.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:11Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libkernel/File/src/Stdio.cppL1421-1422Some 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/Rename.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/tests/GuestFilesystem.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/prx/libc/src/Rename.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/tests/GuestFilesystem.cppcore/libs/prx/libc/src/Rename.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/prx/libkernel/File/src/Stdio.cppcore/libs/tests/GuestFilesystem.cpp