fix(filesystem): reject invalid parent traversal on Windows #3485

Merged
santhoshkumar-dev merged 3 commits from upstream-pr/3485 into main 2026-10-11 21:24:37 +00:00
santhoshkumar-dev commented 2026-10-11 11:25:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T11:25:49Z.


What

Fixes #3117. A guest path such as missing/../present.txt currently reaches present.txt on Windows, so an invalid open, truncate, rename or unlink can operate on the real target. Validate the directory before removing a parent component and return ENOENT for a missing component or ENOTDIR for a file component.

Carries milescoviello's original Linux fix (98a5a9991bf2990173d2d137515d0ef6206b2535) with authorship preserved, then adds Windows validation and error propagation. The existing branch left invalid components for the host to reject; Win32 normalizes those components again. Filesystem entry points now translate resolver failures into their guest errors. APR, AvPlayer and font loading preserve their existing failure results. A failed freopen also closes the original stream.

The regressions check invalid and valid traversal, case matching, guest working directories, mount aliases, symlinks where available, missing-leaf creation, and preservation of existing files/directories after failed writes. Native Windows drive/UNC paths retain their existing bypass; host directory symlink parent traversal remains lexical.

Tested

Rebased on main at 0f863c102.

  • Windows 11 Pro 26200, AMD Radeon RX 6700 XT, WinLibs MinGW-w64 GCC 15.2.0 r7, Release:
    • The new guest_filesystem and guest_kernel_sys cases fail with main's production files and pass with the fix.
    • Full ctest: 833 of 836 pass, 5 skipped. The 3 failures (windows_exceptions, agc_driver_lds_mixed_width_atomics, agc_driver_pixel_interlock) fail the same way with this PR's 16 files reverted to main: an exception through std::call_once and two GPU results on this card.
  • Ubuntu 24.04 under WSL2, GCC 13.3, Release: 28 selected filesystem, path, directory, stream, save-data, APR, AvPlayer and font tests pass.
  • No console test. This is a filesystem regression fix, not a gameplay claim.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes (Codex and Claude Code); the carried Linux commit was also disclosed as AI-assisted by its author

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4818704067 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-11T11:25:49Z. --- ### What Fixes #3117. A guest path such as `missing/../present.txt` currently reaches `present.txt` on Windows, so an invalid open, truncate, rename or unlink can operate on the real target. Validate the directory before removing a parent component and return `ENOENT` for a missing component or `ENOTDIR` for a file component. Carries milescoviello's original Linux fix (`98a5a9991bf2990173d2d137515d0ef6206b2535`) with authorship preserved, then adds Windows validation and error propagation. The existing branch left invalid components for the host to reject; Win32 normalizes those components again. Filesystem entry points now translate resolver failures into their guest errors. APR, AvPlayer and font loading preserve their existing failure results. A failed `freopen` also closes the original stream. The regressions check invalid and valid traversal, case matching, guest working directories, mount aliases, symlinks where available, missing-leaf creation, and preservation of existing files/directories after failed writes. Native Windows drive/UNC paths retain their existing bypass; host directory symlink parent traversal remains lexical. ### Tested Rebased on `main` at `0f863c102`. - Windows 11 Pro 26200, AMD Radeon RX 6700 XT, WinLibs MinGW-w64 GCC 15.2.0 r7, Release: - The new `guest_filesystem` and `guest_kernel_sys` cases fail with `main`'s production files and pass with the fix. - Full `ctest`: 833 of 836 pass, 5 skipped. The 3 failures (`windows_exceptions`, `agc_driver_lds_mixed_width_atomics`, `agc_driver_pixel_interlock`) fail the same way with this PR's 16 files reverted to `main`: an exception through `std::call_once` and two GPU results on this card. - Ubuntu 24.04 under WSL2, GCC 13.3, Release: 28 selected filesystem, path, directory, stream, save-data, APR, AvPlayer and font tests pass. - No console test. This is a filesystem regression fix, not a gameplay claim. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes (Codex and Claude Code); the carried Linux commit was also disclosed as AI-assisted by its author 🤖 Generated with [Claude Code](https://claude.com/claude-code)
milescoviello commented 2026-10-11 11:30:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-11T11:30:03Z.


Thanks @santhoshkumar-dev for carrying my commit with its authorship and adding the Windows half.

Native Linux run of this PR's head (f50a5fa7): Gentoo, GCC 15.3.0, Release with CI's configure flags, RTX 5090 Laptop GPU.

  • 36/36 selected tests pass: guest_filesystem, guest_kernel_sys, APR, AvPlayer, font, path, directory, stream and save-data.
  • Full ctest: 829/829. I left out only the three guest_video_out_* tests, which time out here while the laptop's displays are off.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108553607 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6108553607). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-11T11:30:03Z. --- Thanks @santhoshkumar-dev for carrying my commit with its authorship and adding the Windows half. Native Linux run of this PR's head (`f50a5fa7`): Gentoo, GCC 15.3.0, Release with CI's configure flags, RTX 5090 Laptop GPU. - 36/36 selected tests pass: `guest_filesystem`, `guest_kernel_sys`, APR, AvPlayer, font, path, directory, stream and save-data. - Full `ctest`: 829/829. I left out only the three `guest_video_out_*` tests, which time out here while the laptop's displays are off. AI-assisted: yes
adriadam10 commented 2026-10-11 11:58:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:58:25Z.


Rebased onto current main (the empty-path checks added to sceKernelUnlink/Rename/Rmdir/Chmod/Truncate/Stat conflicted with the new resolver error handling; both kept, authorship of both commits preserved). On Linux with the PR merged onto main: scoped build and 171 ctest tests pass. Windows is covered by the runs from the author and @Silverash-i8; merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108778518 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6108778518). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T11:58:25Z. --- Rebased onto current `main` (the empty-path checks added to `sceKernelUnlink`/`Rename`/`Rmdir`/`Chmod`/`Truncate`/`Stat` conflicted with the new resolver error handling; both kept, authorship of both commits preserved). On Linux with the PR merged onto `main`: scoped build and 171 ctest tests pass. Windows is covered by the runs from the author and @Silverash-i8; merging once CI is green.
milescoviello commented 2026-10-11 12:01:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-11T12:01:09Z.


@adriadam10 the conventions failure here isn't from this PR. Since #3470 (ddf6b8c9), main has a 3rdparty/imgui gitlink (6d910d54) with no entry in .gitmodules. The checkout step's submodule init then fails with fatal: No url found for submodule path '3rdparty/imgui' in .gitmodules, for every PR checked against main since about 11:55 (e.g. https-ca-list-stubs and Direct-Memory-Exception fail the same way). Removing the stray gitlink (git rm --cached 3rdparty/imgui), or adding its .gitmodules entry if imgui is meant to be a submodule, should clear them all.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108800251 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6108800251). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-11T12:01:09Z. --- @adriadam10 the `conventions` failure here isn't from this PR. Since #3470 (`ddf6b8c9`), `main` has a `3rdparty/imgui` gitlink (`6d910d54`) with no entry in `.gitmodules`. The checkout step's submodule init then fails with `fatal: No url found for submodule path '3rdparty/imgui' in .gitmodules`, for every PR checked against `main` since about 11:55 (e.g. `https-ca-list-stubs` and `Direct-Memory-Exception` fail the same way). Removing the stray gitlink (`git rm --cached 3rdparty/imgui`), or adding its `.gitmodules` entry if imgui is meant to be a submodule, should clear them all.
santhoshkumar-dev commented 2026-10-11 12:04:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T12:04:34Z.


Thank you all:

  • @milescoviello for the original fix, the native Linux run (36/36 selected, 829/829 full) and for tracking down the conventions failure.
  • @adriadam10 for rebasing onto main and keeping both the new empty-path checks and the resolver error handling in sceKernelUnlink/Rename/Rmdir/Chmod/Truncate/Stat.
  • @Silverash-i8 for the Windows run in #3117 that showed missing/../present.txt still resolved there. That is what the second commit fixes.

On CI: agreed with milescoviello, the only failing check is conventions, from main's 3rdparty/imgui gitlink with no .gitmodules entry (still missing on main at 2220effbe). Nothing in this PR touches it. I'll leave the branch as rebased (2c1eb02c6) and won't push over it. If a Windows run of the rebased head would help before merging, I can do one.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108828054 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6108828054). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-11T12:04:34Z. --- Thank you all: - @milescoviello for the original fix, the native Linux run (36/36 selected, 829/829 full) and for tracking down the `conventions` failure. - @adriadam10 for rebasing onto `main` and keeping both the new empty-path checks and the resolver error handling in `sceKernelUnlink`/`Rename`/`Rmdir`/`Chmod`/`Truncate`/`Stat`. - @Silverash-i8 for the Windows run in #3117 that showed `missing/../present.txt` still resolved there. That is what the second commit fixes. On CI: agreed with milescoviello, the only failing check is `conventions`, from `main`'s `3rdparty/imgui` gitlink with no `.gitmodules` entry (still missing on `main` at `2220effbe`). Nothing in this PR touches it. I'll leave the branch as rebased (`2c1eb02c6`) and won't push over it. If a Windows run of the rebased head would help before merging, I can do one. AI-assisted: yes (Claude Code)
Silverash-i8 commented 2026-10-11 12:14:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T12:14:34Z.


@santhoshkumar-dev here's a Windows run of the rebased head, since my earlier run in #3117 was only of the first commit (it showed missing/../present.txt still resolving, so it doesn't cover the Windows half): Windows 11, WinLibs GCC 15.2.0 r7, Release, 2c1eb02c merged onto main 2220effb, full build.

  • guest_filesystem passes, with all the new parent-traversal checks.
  • guest_kernel_sys, APR, AvPlayer, font, path, directory, stream and save-data tests pass (17 tests matching those).
  • Non-GPU suite (ctest -E "^agc_"): 460/462. windows_exceptions fails as it does on main (#3411). guest_ampr_markers failed once and then passed 5/5 on rerun (the intermittent failure from #3371).

To get there I had to add two things that aren't about this PR, because both tests fail on Windows on main right now:

  • guest_filesystem aborts at the empty-path check from #3465 (Require(!restoreTimeError): MinGW can't set a directory's write time). I've opened #3518 for that.
  • guest_kernel_sys aborts on symlink: Function not implemented from #3491, which #3510 fixes. I merged #3510 for this run.

Both merged onto this PR without conflicts (#3510 also changes libkernel_sys/Export.cpp, in symlink only), and both failures are on main without this PR.

One gap, from symlink (#3491) landing while this PR was open: the rebased branch has it, and it still calls ResolvePath_nid_no_patch(created) directly, and with this PR that now throws for an invalid ... With a temporary probe in guest_kernel_sys, symlink("original.bin", "<root>/missing/../probe") aborts the test with an uncaught filesystem_error: Guest path component is not a directory, where link in the same file returns ENOENT through ResolvePathError_nid_no_patch. Converting symlink's one call the same way would cover it, here or as a follow-up. The libc callers (rename, realpath, Filesystem.cpp) already catch filesystem_error.

AI-assisted (Claude Code); I ran all of this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108908500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6108908500). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T12:14:34Z. --- @santhoshkumar-dev here's a Windows run of the rebased head, since my earlier run in #3117 was only of the first commit (it showed `missing/../present.txt` still resolving, so it doesn't cover the Windows half): Windows 11, WinLibs GCC 15.2.0 r7, Release, `2c1eb02c` merged onto `main` 2220effb, full build. - `guest_filesystem` passes, with all the new parent-traversal checks. - `guest_kernel_sys`, APR, AvPlayer, font, path, directory, stream and save-data tests pass (17 tests matching those). - Non-GPU suite (`ctest -E "^agc_"`): 460/462. `windows_exceptions` fails as it does on `main` (#3411). `guest_ampr_markers` failed once and then passed 5/5 on rerun (the intermittent failure from #3371). To get there I had to add two things that aren't about this PR, because both tests fail on Windows on `main` right now: - `guest_filesystem` aborts at the empty-path check from #3465 (`Require(!restoreTimeError)`: MinGW can't set a directory's write time). I've opened #3518 for that. - `guest_kernel_sys` aborts on `symlink: Function not implemented` from #3491, which #3510 fixes. I merged #3510 for this run. Both merged onto this PR without conflicts (#3510 also changes `libkernel_sys/Export.cpp`, in `symlink` only), and both failures are on `main` without this PR. One gap, from `symlink` (#3491) landing while this PR was open: the rebased branch has it, and it still calls `ResolvePath_nid_no_patch(created)` directly, and with this PR that now throws for an invalid `..`. With a temporary probe in `guest_kernel_sys`, `symlink("original.bin", "<root>/missing/../probe")` aborts the test with an uncaught `filesystem_error: Guest path component is not a directory`, where `link` in the same file returns ENOENT through `ResolvePathError_nid_no_patch`. Converting `symlink`'s one call the same way would cover it, here or as a follow-up. The libc callers (`rename`, `realpath`, `Filesystem.cpp`) already catch `filesystem_error`. AI-assisted (Claude Code); I ran all of this on my machine.
santhoshkumar-dev commented 2026-10-11 12:22:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T12:22:48Z.


Thanks @Silverash-i8 for the Windows run of the rebased head and for catching symlink. Fixed here in 1216b7f3: symlink now resolves its new path with ResolvePathError_nid_no_patch, as link does, so missing/../x returns ENOENT and file.txt/../x returns ENOTDIR instead of throwing. guest_kernel_sys gains a symlink case in the existing invalid-parent loop.

  • Linux (Ubuntu 24.04 under WSL2, GCC 13.3, Release): the new case aborts on 2c1eb02c with the uncaught filesystem_error: Guest path component is not a directory you saw, and passes with the fix. The 28 filesystem, path, directory, stream, save-data, APR, AvPlayer and font tests pass.
  • Windows 11, RX 6700 XT, WinLibs GCC 15.2.0 r7, Release, with #3510 and #3518 merged on top for the run only, as you did: guest_filesystem passes, and guest_kernel_sys passes the invalid-parent loop including the new case. #3510 merges with this change without conflicts.

One note for #3510, not this PR: on this machine Developer Mode is on, so its CreateSymbolicLinkW succeeds (symbolic → original.bin is a real symlink), and guest_kernel_sys then stops at the success case's std::filesystem::is_symlink(std::filesystem::symlink_status(symbolic)) (line 126 with #3510 merged), which MinGW's libstdc++ does not report as a symlink. Without Developer Mode the call returns EPERM and the test takes the "symbolic links unavailable" branch, which is presumably why your run passed.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108974994 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6108974994). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-11T12:22:48Z. --- Thanks @Silverash-i8 for the Windows run of the rebased head and for catching `symlink`. Fixed here in `1216b7f3`: `symlink` now resolves its new path with `ResolvePathError_nid_no_patch`, as `link` does, so `missing/../x` returns ENOENT and `file.txt/../x` returns ENOTDIR instead of throwing. `guest_kernel_sys` gains a `symlink` case in the existing invalid-parent loop. - Linux (Ubuntu 24.04 under WSL2, GCC 13.3, Release): the new case aborts on `2c1eb02c` with the uncaught `filesystem_error: Guest path component is not a directory` you saw, and passes with the fix. The 28 filesystem, path, directory, stream, save-data, APR, AvPlayer and font tests pass. - Windows 11, RX 6700 XT, WinLibs GCC 15.2.0 r7, Release, with #3510 and #3518 merged on top for the run only, as you did: `guest_filesystem` passes, and `guest_kernel_sys` passes the invalid-parent loop including the new case. #3510 merges with this change without conflicts. One note for #3510, not this PR: on this machine Developer Mode is on, so its `CreateSymbolicLinkW` succeeds (`symbolic` → `original.bin` is a real symlink), and `guest_kernel_sys` then stops at the success case's `std::filesystem::is_symlink(std::filesystem::symlink_status(symbolic))` (line 126 with #3510 merged), which MinGW's libstdc++ does not report as a symlink. Without Developer Mode the call returns EPERM and the test takes the "symbolic links unavailable" branch, which is presumably why your run passed. AI-assisted: yes (Claude Code)
milescoviello commented 2026-10-11 12:46:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-11T12:46:09Z.


@santhoshkumar-dev #3511 is in (fab9f576), but conventions still fails here because this branch itself carries the stray 3rdparty/imgui gitlink: it was rebased onto main after ddf6b8c9 and before #3511, and the job checks out the PR head. Rebasing onto current main (a11c8f7f, it merges cleanly) should turn it green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109167450 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6109167450). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-11T12:46:09Z. --- @santhoshkumar-dev #3511 is in (`fab9f576`), but `conventions` still fails here because this branch itself carries the stray `3rdparty/imgui` gitlink: it was rebased onto `main` after `ddf6b8c9` and before #3511, and the job checks out the PR head. Rebasing onto current `main` (a11c8f7f, it merges cleanly) should turn it green.
santhoshkumar-dev commented 2026-10-11 12:56:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T12:56:22Z.


@milescoviello thanks, that was it. Rebased onto main at a11c8f7f (after #3511 removed the stray gitlink). It applied cleanly, the branch no longer carries 3rdparty/imgui, and authorship of all three commits is unchanged: 21d1698c (yours), 557f726a, and 548bedd9 (the symlink fix for @Silverash-i8's report). check_conventions.py --base origin/main and git diff --check pass, and guest_kernel_sys and guest_filesystem pass on the rebased head (Linux, GCC 13.3, Release).

@adriadam10 thanks for the earlier rebase. Since then the branch gained one commit, 548bedd9: symlink (#3491, merged while this was open) now returns the resolver's error like link instead of throwing for an invalid .., with a case in guest_kernel_sys. Verified before/after on Linux, and on Windows with #3510/#3518 merged for that run only. Conventions should now pass. Build and Progress report need a maintainer's approval to run on this push.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109251413 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6109251413). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-11T12:56:22Z. --- @milescoviello thanks, that was it. Rebased onto `main` at `a11c8f7f` (after #3511 removed the stray gitlink). It applied cleanly, the branch no longer carries `3rdparty/imgui`, and authorship of all three commits is unchanged: `21d1698c` (yours), `557f726a`, and `548bedd9` (the `symlink` fix for @Silverash-i8's report). `check_conventions.py --base origin/main` and `git diff --check` pass, and `guest_kernel_sys` and `guest_filesystem` pass on the rebased head (Linux, GCC 13.3, Release). @adriadam10 thanks for the earlier rebase. Since then the branch gained one commit, `548bedd9`: `symlink` (#3491, merged while this was open) now returns the resolver's error like `link` instead of throwing for an invalid `..`, with a case in `guest_kernel_sys`. Verified before/after on Linux, and on Windows with #3510/#3518 merged for that run only. `Conventions` should now pass. `Build` and `Progress report` need a maintainer's approval to run on this push. AI-assisted: yes (Claude Code)
santhoshkumar-dev commented 2026-10-11 13:57:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T13:57:16Z.


@adriadam10 friendly ping: the branch is rebased onto a11c8f7f and Conventions passes now. Build and Progress report have been waiting for approval since 12:56 (a fork push). Could you approve them when you have a moment?

On the overlap note with #3510: since its update (6aa0b4fb), the two conflict in one hunk of readlink in libkernel_sys/Export.cpp. This PR replaces const auto native = ResolvePath_nid_no_patch(path); with the ResolvePathError_nid_no_patch form, and #3510 adds its Windows reparse-point check right after that line. Keeping both resolves it: this PR's two lines, then #3510's #ifdef _WIN32 block. If #3510 lands first, I'll rebase this one.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109778039 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6109778039). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-11T13:57:16Z. --- @adriadam10 friendly ping: the branch is rebased onto `a11c8f7f` and `Conventions` passes now. `Build` and `Progress report` have been waiting for approval since 12:56 (a fork push). Could you approve them when you have a moment? On the overlap note with #3510: since its update (`6aa0b4fb`), the two conflict in one hunk of `readlink` in `libkernel_sys/Export.cpp`. This PR replaces `const auto native = ResolvePath_nid_no_patch(path);` with the `ResolvePathError_nid_no_patch` form, and #3510 adds its Windows reparse-point check right after that line. Keeping both resolves it: this PR's two lines, then #3510's `#ifdef _WIN32` block. If #3510 lands first, I'll rebase this one. AI-assisted: yes (Claude Code)
santhoshkumar-dev commented 2026-10-11 19:57:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T19:57:39Z.


Rebased onto main at 12c22662 now that #3510 is in. The readlink conflict is resolved as described above: this PR's ResolvePathError_nid_no_patch lines come first, then #3510's #ifdef _WIN32 reparse-point check. symlink applies cleanly on top of #3510's CreateSymbolicLinkW path, and keeps returning the resolver's error for an invalid ... Authorship of all three commits is unchanged (ad14190c, 17827dd9, 2ad91656).

I rechecked the remaining direct ResolvePath_nid_no_patch callers: none were added since the last rebase. The ones left resolve fixed paths, catch std::exception (dlopen), or already threw for a missing file before this PR (sceNgs2ParseWaveformFile).

  • Windows 11, RX 6700 XT, WinLibs GCC 15.2.0 r7, Release: guest_kernel_sys and guest_filesystem pass, including #3510's symlink success cases (Developer Mode on).
  • Ubuntu 24.04 under WSL2, GCC 13.3, Release: the same two tests and the 28 filesystem, path, directory, stream, save-data, APR, AvPlayer and font tests pass.
  • check_conventions.py --base origin/main and git diff --check pass.

Build and Progress report will need approval again for this push.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113105201 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6113105201). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-11T19:57:39Z. --- Rebased onto `main` at `12c22662` now that #3510 is in. The `readlink` conflict is resolved as described above: this PR's `ResolvePathError_nid_no_patch` lines come first, then #3510's `#ifdef _WIN32` reparse-point check. `symlink` applies cleanly on top of #3510's `CreateSymbolicLinkW` path, and keeps returning the resolver's error for an invalid `..`. Authorship of all three commits is unchanged (`ad14190c`, `17827dd9`, `2ad91656`). I rechecked the remaining direct `ResolvePath_nid_no_patch` callers: none were added since the last rebase. The ones left resolve fixed paths, catch `std::exception` (`dlopen`), or already threw for a missing file before this PR (`sceNgs2ParseWaveformFile`). - Windows 11, RX 6700 XT, WinLibs GCC 15.2.0 r7, Release: `guest_kernel_sys` and `guest_filesystem` pass, including #3510's symlink success cases (Developer Mode on). - Ubuntu 24.04 under WSL2, GCC 13.3, Release: the same two tests and the 28 filesystem, path, directory, stream, save-data, APR, AvPlayer and font tests pass. - `check_conventions.py --base origin/main` and `git diff --check` pass. `Build` and `Progress report` will need approval again for this push. AI-assisted: yes (Claude Code)
github-actions[bot] commented 2026-10-11 20:04:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T20:04:14Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
#3635 core/libs/prx/libc/src/Directory.cpp L74-93
#3654 core/libs/tests/GuestFilesystem.cpp L78-79
#3892 core/libs/prx/libc/src/General.cpp L117, L126-129
#3959 core/libs/prx/libc/src/General.cpp L117
#3968 core/libs/prx/libkernel/File/src/Open.cpp L135-145
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113165745 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6113165745). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T20:04:14Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3635 | `core/libs/prx/libc/src/Directory.cpp` [L74-93](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/prx/libc/src/Directory.cpp#L74-L93) | | | | #3654 | `core/libs/tests/GuestFilesystem.cpp` [L78-79](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/tests/GuestFilesystem.cpp#L78-L79) | | | | #3892 | `core/libs/prx/libc/src/General.cpp` [L117](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/prx/libc/src/General.cpp#L117), [L126-129](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/prx/libc/src/General.cpp#L126-L129) | | | | #3959 | `core/libs/prx/libc/src/General.cpp` [L117](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/prx/libc/src/General.cpp#L117) | | | | #3968 | `core/libs/prx/libkernel/File/src/Open.cpp` [L135-145](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/core/libs/prx/libkernel/File/src/Open.cpp#L135-L145) | | |
santhoshkumar-dev commented 2026-10-11 20:16:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-11T20:16:04Z.


@oneandonlydean could you take a look at this one as well when you have a moment? It's rebased onto current main with the #3510 conflict resolved. Conventions passes, and Build/Progress report passed on the previous push and are waiting for approval on this one.

I also have a performance improvement ready on another branch, which I can only open once this lands because of the one-open-PR limit.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113278978 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6113278978). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-11T20:16:04Z. --- @oneandonlydean could you take a look at this one as well when you have a moment? It's rebased onto current `main` with the #3510 conflict resolved. `Conventions` passes, and `Build`/`Progress report` passed on the previous push and are waiting for approval on this one. I also have a performance improvement ready on another branch, which I can only open once this lands because of the one-open-PR limit. AI-assisted: yes (Claude Code)
adriadam10 commented 2026-10-11 21:24:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:24:33Z.


Checked the current head on Linux merged onto main: scoped build and 171 ctest tests pass, and guest_filesystem, guest_kernel_sys, guest_font and the APR resolve test fail without the change. The earlier conventions failure was the stray 3rdparty/imgui gitlink on main; it passes now, along with the other PR checks. Windows is covered by the runs from @Silverash-i8 and the author; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113932898 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6113932898). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:24:33Z. --- Checked the current head on Linux merged onto `main`: scoped build and 171 ctest tests pass, and `guest_filesystem`, `guest_kernel_sys`, `guest_font` and the APR resolve test fail without the change. The earlier `conventions` failure was the stray `3rdparty/imgui` gitlink on `main`; it passes now, along with the other PR checks. Windows is covered by the runs from @Silverash-i8 and the author; merging.
oneandonlydean commented 2026-10-11 21:25:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T21:25:05Z.


Checked the diff on 2ad91656: the resolver's error reaches every entry point in its own error style, and the readlink and symlink paths keep #3510's Windows code. Full build started on this head; merging when it's green.

One thing I'm checking alongside it: a title that opens dir/../file where dir isn't in the host layout worked before and now gets ENOENT. I'm running two titles with every .. path logged and will post here only if one fails.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113939446 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6113939446). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T21:25:05Z. --- Checked the diff on 2ad91656: the resolver's error reaches every entry point in its own error style, and the `readlink` and `symlink` paths keep #3510's Windows code. Full build started on this head; merging when it's green. One thing I'm checking alongside it: a title that opens `dir/../file` where `dir` isn't in the host layout worked before and now gets ENOENT. I'm running two titles with every `..` path logged and will post here only if one fails.
milescoviello commented 2026-10-11 21:26:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-11T21:26:21Z.


Thanks for checking that case, @oneandonlydean, and thanks @santhoshkumar-dev for carrying the commit. ENOENT there is what FreeBSD returns for a missing component, but a directory that exists on the console and not in our host layout would hit it too. If one of the titles does, I'm glad to look at its path log and follow up, for example by creating that directory in the layout or keeping the old behaviour for that prefix.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113952215 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3485#issuecomment-6113952215). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-11T21:26:21Z. --- Thanks for checking that case, @oneandonlydean, and thanks @santhoshkumar-dev for carrying the commit. ENOENT there is what FreeBSD returns for a missing component, but a directory that exists on the console and not in our host layout would hit it too. If one of the titles does, I'm glad to look at its path log and follow up, for example by creating that directory in the layout or keeping the old behaviour for that prefix. AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3485
No description provided.