fix(libc): open long Windows host paths #7187

Merged
Amoenus merged 4 commits from upstream-pr/7187 into main 2026-10-17 21:00:29 +00:00
Amoenus commented 2026-10-17 15:29:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T15:29:51Z.


What

Fixes #7182. PPSA99902 (Sonic Unleashed Recompiled, #3036 / discussion #4443) repeatedly fails to open an existing WorldMap.arl when its resolved Windows host path is 266 characters. The guest path itself is short. OpenNative passes the host spelling to CreateFileW, so a converted process without long-path opt-in gets ENOENT for a file that exists.

Use the extended Unicode drive/UNC spelling for resolved absolute host paths crossing MAX_PATH. Preserve existing namespace prefixes, access/share/disposition flags and error handling. Ten added production lines and one replaced argument; no retry, fallback, environment switch, manifest change or title-specific path. Microsoft documents this CreateFileW path form. #4618 covers the relinker process, explicitly leaving converted executables unchanged.

This changes fopen's native open helper, including modes that use it. It does not make every Windows file API long-path independent. UNC spelling follows the documented namespace form; no live network-share result is claimed.

Tested

Current head cf84fc44a8f969bb39cc079c0e9b8c7abfc27207, rebased onto main 66702f1cffd3646f2d674ed093fde0a85a70761f after #7068 merged. Full local relinker/system-library builds pass on Windows 11 Enterprise 26200 / WinLibs GCC 15.2.0 r7 and Ubuntu 24.04 / GCC 13.3, Release.

  • Original regression control: test-only 94ea13c621 on unchanged main84 fails 3/3 fresh processes: fopen mode rb failed: guest errno=2, resolved characters=328. This historical control remains pinned to main84, not the new base. The fixture checks ordinary and already-extended long-path read bytes, creation, exclusive-existing refusal, append/update, missing-file ENOENT and relative-host-alias reads.
  • Exact current head: Windows 12 file/stream/filesystem/lock groups × 3 = 36 passes; Linux 6 groups × 3 = 18 passes, including main's newly merged fopen-error and scalar-I/O controls. The Windows-only regression is not registered on Linux. No skips or timeouts. Conventions, whitespace and registration checks pass (946 registered test executables, none newly unrun).
  • Windows CI reproduced locally: with cwd on a temporary Z: substitution and temp files on C:, pre-correction e61af865 fails 3/3 with the exact CI signature guest errno=20, resolved characters=11. Current a44455b740 passes 3/3 in that same split-drive setup, as well as normal CTest runs. The relative case temporarily uses its fixture root as cwd, requires a nonempty relative path, restores the original cwd with a scope guard and verifies restoration. The temporary drive mapping is removed after both controls. Each invocation completes well under 30 s.
  • Matched title component check: observer043f vs observer + this production change5675, 120.792 / 120.541 s, 32 captures each. Only libc.prx differs; the executable, guest module, other126 PRXs and dependencies match. Fresh original assets/user data, equal-length runtime roots, original configurations/protected hashes unchanged. Verified RTX5080 / driver32.0.16.1062, Khronos1.4.363 loaded, zero observed validation errors/warnings. Intact samples show69 failed opens of the existing266-character .arl before the change and none after; interleaved records are excluded. Libc reads increase from30,095,141 to32,599,419 bytes. Both runs still show initial NOW LOADING at the harness limit (exit1): no menu/gameplay/FPS or title-unblock claim, and no unchanged-main whole-title claim.
  • Cppcheck 2.20 and clang-tidy 23.1.3 complete on both changed C++ files at current cf84fc44a8 without parser/configuration failures. Clang-tidy has no selected diagnostics. Cppcheck retains 3 previously reviewed advisories in unchanged ownership-transfer/nullability code; no static-clean claim or unrelated cleanup.

Duplicate/overlap review: #7068 has merged its errno translation; this branch is based on it. Open #6287 changes append access, #6541 random-device streams and #5668 standard-stream reopen failure handling. None supplies this conversion. Wider test reorganization (#6044) and platform work (#5021/#6222) may still require mechanical rebases; no dependency on them is bundled.

Review follow-up

MarcZX100 identified the throwing path-resolution edge. The helper uses absolute(path, error_code) and returns nullptr on resolution failure. Following #7068's merge, it preserves host errno for the outer fopen entry point to translate once; it no longer maps an error to guest errno inside the helper. The unavailable-CWD branch has source review only, without fault injection.

oneandonlydean identified the split-drive fixture failure in full Windows CI. Commit a44455b740 corrects that fixture, with matching local failing/passing controls above. Prior head3811's Windows CI failed this relative-alias case; those checks are not evidence for the new head. All automatic checks that ran pass on cf84, including relinker Windows/Linux/macOS. Full Windows/Linux application lanes were skipped; a fresh maintainer-triggered full run remains requested.

Additional namespace control at cf84fc44a8: validating #7196 exposed this toolchain's absolute rewriting an existing extended namespace into an invalid path. The new fixture case fails 3/3 before the correction (errno22, resolved332 characters). Checking existing namespace prefixes before absolute preserves them; the full36/18 Windows/Linux passes and3 split-drive passes above were repeated on cf84. UNC spelling remains source-reviewed, without a live-share claim.

The independent overlap review confirms #5668 and #6287 address separate behaviors. The title component evidence above retains its5675 source pin. The exact-runtime short-directory control reaches the older DCC/device-loss stops; #7195 separately confirms the remaining long-host-path metadata failure in sceKernelStat, outside this PR.

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 under Silent stubs in their library's technical debt file
  • 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: n/a
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #7182
  • Unblocks: none established; confirmed asset-open gap for PPSA99902, discussion #4443
  • GPUs tested: n/a for this filesystem change; the component title run used NVIDIA GeForce RTX5080, driver32.0.16.1062, Windows11 Enterprise26200
  • AI-assisted: yes, Codex; author responsible for every line
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4901376388 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T15:29:51Z. --- ### What Fixes #7182. PPSA99902 (Sonic Unleashed Recompiled, #3036 / discussion #4443) repeatedly fails to open an existing `WorldMap.arl` when its resolved Windows host path is 266 characters. The guest path itself is short. `OpenNative` passes the host spelling to `CreateFileW`, so a converted process without long-path opt-in gets ENOENT for a file that exists. Use the extended Unicode drive/UNC spelling for resolved absolute host paths crossing MAX_PATH. Preserve existing namespace prefixes, access/share/disposition flags and error handling. Ten added production lines and one replaced argument; no retry, fallback, environment switch, manifest change or title-specific path. [Microsoft documents this CreateFileW path form](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew). #4618 covers the relinker process, explicitly leaving converted executables unchanged. This changes `fopen`'s native open helper, including modes that use it. It does not make every Windows file API long-path independent. UNC spelling follows the documented namespace form; no live network-share result is claimed. ### Tested Current head `cf84fc44a8f969bb39cc079c0e9b8c7abfc27207`, rebased onto main `66702f1cffd3646f2d674ed093fde0a85a70761f` after #7068 merged. Full local relinker/system-library builds pass on Windows 11 Enterprise 26200 / WinLibs GCC 15.2.0 r7 and Ubuntu 24.04 / GCC 13.3, Release. - Original regression control: test-only [94ea13c621](https://github.com/Amoenus/AnyPS5/commit/94ea13c621b821fce6c0fe98033e5f1d0e21f15f) on unchanged main84 fails 3/3 fresh processes: `fopen mode rb failed: guest errno=2, resolved characters=328`. This historical control remains pinned to main84, not the new base. The fixture checks ordinary and already-extended long-path read bytes, creation, exclusive-existing refusal, append/update, missing-file ENOENT and relative-host-alias reads. - Exact current head: Windows 12 file/stream/filesystem/lock groups × 3 = **36 passes**; Linux 6 groups × 3 = **18 passes**, including main's newly merged fopen-error and scalar-I/O controls. The Windows-only regression is not registered on Linux. No skips or timeouts. Conventions, whitespace and registration checks pass (946 registered test executables, none newly unrun). - Windows CI reproduced locally: with cwd on a temporary `Z:` substitution and temp files on `C:`, pre-correction e61af865 fails 3/3 with the exact CI signature `guest errno=20, resolved characters=11`. Current a44455b740 passes 3/3 in that same split-drive setup, as well as normal CTest runs. The relative case temporarily uses its fixture root as cwd, requires a nonempty relative path, restores the original cwd with a scope guard and verifies restoration. The temporary drive mapping is removed after both controls. Each invocation completes well under 30 s. - Matched title component check: [observer043f](https://github.com/Amoenus/AnyPS5/commit/043f7e7541c45be7af48932f4ca57ac7d59198dc) vs [observer + this production change5675](https://github.com/Amoenus/AnyPS5/commit/56757d6eb288d658c7f0ba709d3fb71b0bf29cdc), 120.792 / 120.541 s, 32 captures each. Only `libc.prx` differs; the executable, guest module, other126 PRXs and dependencies match. Fresh original assets/user data, equal-length runtime roots, original configurations/protected hashes unchanged. Verified RTX5080 / driver32.0.16.1062, Khronos1.4.363 loaded, zero observed validation errors/warnings. Intact samples show69 failed opens of the existing266-character `.arl` before the change and none after; interleaved records are excluded. Libc reads increase from30,095,141 to32,599,419 bytes. Both runs still show initial NOW LOADING at the harness limit (exit1): **no menu/gameplay/FPS or title-unblock claim**, and no unchanged-main whole-title claim. - Cppcheck 2.20 and clang-tidy 23.1.3 complete on both changed C++ files at current cf84fc44a8 without parser/configuration failures. Clang-tidy has no selected diagnostics. Cppcheck retains 3 previously reviewed advisories in unchanged ownership-transfer/nullability code; no static-clean claim or unrelated cleanup. Duplicate/overlap review: #7068 has merged its errno translation; this branch is based on it. Open #6287 changes append access, #6541 random-device streams and #5668 standard-stream reopen failure handling. None supplies this conversion. Wider test reorganization (#6044) and platform work (#5021/#6222) may still require mechanical rebases; no dependency on them is bundled. <!-- codex-fopen-review-resolution-v1 --> ### Review follow-up [MarcZX100 identified the throwing path-resolution edge](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6235808779). The helper uses `absolute(path, error_code)` and returns `nullptr` on resolution failure. Following #7068's merge, it preserves host errno for the outer fopen entry point to translate once; it no longer maps an error to guest errno inside the helper. The unavailable-CWD branch has source review only, without fault injection. [oneandonlydean identified the split-drive fixture failure in full Windows CI](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6236094482). Commit [a44455b740](https://github.com/Amoenus/AnyPS5/commit/a44455b74084eef4a5d7843f53d67b86a721364f) corrects that fixture, with matching local failing/passing controls above. Prior head3811's Windows CI failed this relative-alias case; those checks are not evidence for the new head. All automatic checks that ran pass on cf84, including relinker Windows/Linux/macOS. Full Windows/Linux application lanes were skipped; a fresh maintainer-triggered full run remains requested. Additional namespace control at [cf84fc44a8](https://github.com/Amoenus/AnyPS5/commit/cf84fc44a8f969bb39cc079c0e9b8c7abfc27207): validating #7196 exposed this toolchain's `absolute` rewriting an existing extended namespace into an invalid path. The new fixture case fails 3/3 before the correction (`errno22`, resolved332 characters). Checking existing namespace prefixes before `absolute` preserves them; the full36/18 Windows/Linux passes and3 split-drive passes above were repeated on cf84. UNC spelling remains source-reviewed, without a live-share claim. [The independent overlap review](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6235870496) confirms #5668 and #6287 address separate behaviors. The title component evidence above retains its5675 source pin. The exact-runtime short-directory control reaches the older DCC/device-loss stops; [#7195](https://github.com/boykopovar/AnyPS5/issues/7195) separately confirms the remaining long-host-path metadata failure in `sceKernelStat`, outside this PR. <!-- /codex-fopen-review-resolution-v1 --> ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file - [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: n/a - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #7182 - [x] Unblocks: none established; confirmed asset-open gap for PPSA99902, discussion #4443 - [x] GPUs tested: n/a for this filesystem change; the component title run used NVIDIA GeForce RTX5080, driver32.0.16.1062, Windows11 Enterprise26200 - [x] AI-assisted: yes, Codex; author responsible for every line
MarcZX10 commented 2026-10-17 15:31:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T15:31:29Z.


One edge case to consider: std::filesystem::absolute(path) uses the throwing overload here, but this call is inside OpenNative and fopen_nid_postfix does not catch std::filesystem::filesystem_error around OpenNative (the nearby freopen path does). If resolving the current directory fails, that can escape the C fopen entry point instead of returning nullptr with errno. Could you use the error_code overload and preserve the original CreateFileW path/failure behavior when making it absolute, or catch/map that exception? The normal resolved guest path succeeds in ordinary operation; this is a contract edge case, not a blocker for the reported long-path fix.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235808779 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6235808779). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T15:31:29Z. --- One edge case to consider: `std::filesystem::absolute(path)` uses the throwing overload here, but this call is inside `OpenNative` and `fopen_nid_postfix` does not catch `std::filesystem::filesystem_error` around `OpenNative` (the nearby `freopen` path does). If resolving the current directory fails, that can escape the C `fopen` entry point instead of returning `nullptr` with `errno`. Could you use the `error_code` overload and preserve the original `CreateFileW` path/failure behavior when making it absolute, or catch/map that exception? The normal resolved guest path succeeds in ordinary operation; this is a contract edge case, not a blocker for the reported long-path fix.
github-actions[bot] commented 2026-10-17 15:36:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T15:36:11Z.


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.

Pull request Shared files not compared
PR 5021 core/libs/prx/libc/CMakeLists.txt
PR 5668 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
PR 6044 core/libs/prx/libc/CMakeLists.txt
PR 6222 core/libs/prx/libc/CMakeLists.txt
PR 6287 core/libs/prx/libc/src/FileAndHeap.cpp
PR 6334 core/libs/prx/libc/CMakeLists.txt
PR 7081 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
PR 7084 core/libs/prx/libc/CMakeLists.txt
PR 7201 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235866212 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6235866212). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T15:36:11Z. --- <!-- pr-overlap --> 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. | Pull request | Shared files not compared | |---|---| | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 5668](https://www.github.com/boykopovar/AnyPS5/pull/5668) | `core/libs/prx/libc/CMakeLists.txt`<br>`core/libs/prx/libc/src/FileAndHeap.cpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 6287](https://www.github.com/boykopovar/AnyPS5/pull/6287) | `core/libs/prx/libc/src/FileAndHeap.cpp` | | [PR 6334](https://www.github.com/boykopovar/AnyPS5/pull/6334) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 7081](https://www.github.com/boykopovar/AnyPS5/pull/7081) | `core/libs/prx/libc/CMakeLists.txt`<br>`core/libs/prx/libc/src/FileAndHeap.cpp` | | [PR 7084](https://www.github.com/boykopovar/AnyPS5/pull/7084) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libc/CMakeLists.txt`<br>`core/libs/prx/libc/src/FileAndHeap.cpp` |
MarcZX10 commented 2026-10-17 15:36:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T15:36:29Z.


Manual follow-up to the overlap report: #5668 changes failed freopen behavior in FileStream::Reopen/freopen_nid_postfix and adds a later standard-stream CTest registration; #7187 does not touch those paths, and its Windows CTest registration is in a separate block. #6287 also edits FileAndHeap.cpp, but its changes are append-only access rights, descriptor handling, and append tests; #7187 changes only the path spelling passed to CreateFileW in OpenNative. These are separate behaviors; the shared FileAndHeap.cpp context may need a mechanical rebase if both land. I manually checked these two substantive overlaps; the bot also lists CMake-only shared files on older conflicting branches.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235870496 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6235870496). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T15:36:29Z. --- Manual follow-up to the overlap report: #5668 changes failed `freopen` behavior in `FileStream::Reopen`/`freopen_nid_postfix` and adds a later standard-stream CTest registration; #7187 does not touch those paths, and its Windows CTest registration is in a separate block. #6287 also edits `FileAndHeap.cpp`, but its changes are append-only access rights, descriptor handling, and append tests; #7187 changes only the path spelling passed to `CreateFileW` in `OpenNative`. These are separate behaviors; the shared `FileAndHeap.cpp` context may need a mechanical rebase if both land. I manually checked these two substantive overlaps; the bot also lists CMake-only shared files on older conflicting branches.
MarcZX10 commented 2026-10-17 15:37:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T15:37:33Z.


Hosted checks have completed on head 115b10ef47ef4218ac3a7d482c7dc873a433d9e2: relinker passes on macOS, Ubuntu and Windows; conventions, eligibility, intake, report, register-context and write-watch checks also pass. The broader Linux and Windows application jobs were skipped by path filters, so this is relinker plus the focused checks, not a full application build.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235885873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6235885873). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T15:37:33Z. --- Hosted checks have completed on head `115b10ef47ef4218ac3a7d482c7dc873a433d9e2`: relinker passes on macOS, Ubuntu and Windows; conventions, eligibility, intake, report, register-context and write-watch checks also pass. The broader Linux and Windows application jobs were skipped by path filters, so this is relinker plus the focused checks, not a full application build.
Amoenus commented 2026-10-17 15:46:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T15:46:08Z.


@MarcZX100 addressed, now rebased onto main66702f1c in a44455b74084eef4a5d7843f53d67b86a721364f. absolute(path, error_code) returns nullptr on resolution failure; after #7068's merge, the helper preserves host errno and the outer fopen entry point translates it once. The unavailable-CWD branch remains source-reviewed only.

Current-head local builds, tests and analysis are in the description. The relative-alias fixture was additionally corrected after @oneandonlydean caught its cross-drive assumption in full Windows CI; the previous head's Windows result was a failure, now reproduced and corrected locally. Thanks for the reviews and overlap checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6236017440 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6236017440). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T15:46:08Z. --- @MarcZX100 addressed, now rebased onto main66702f1c in `a44455b74084eef4a5d7843f53d67b86a721364f`. `absolute(path, error_code)` returns `nullptr` on resolution failure; after #7068's merge, the helper preserves host errno and the outer fopen entry point translates it once. The unavailable-CWD branch remains source-reviewed only. Current-head local builds, tests and analysis are in the description. The relative-alias fixture was additionally corrected after @oneandonlydean caught its cross-drive assumption in full Windows CI; the previous head's Windows result was a failure, now reproduced and corrected locally. Thanks for the reviews and overlap checks.
oneandonlydean commented 2026-10-17 15:51:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T15:51:01Z.


Full CI on 3811293e7 (run 39046442206): Linux is green, but Windows fails guest_fopen_long_host_path with fopen mode rb failed: guest errno=20, resolved characters=11 / fopen rejected a valid mapped long host path.

This looks like the new relative-alias case (GuestFopenLongHostPath.cpp:99-106), not the fix itself. On the Windows runner ctest runs under D:\a\AnyPS5, while temp_directory_path() is most likely on C:. Across drive roots std::filesystem::relative(deep, current_path()) returns an empty path, so the alias maps to the cwd and the open fails. A single-drive local run can't show it.

Could you make that case same-drive? For example, set current_path to the temp directory for that case and restore it afterwards, or Require(!relative.empty()) and build the relative path from a base on the same drive. The production change itself looks good.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6236094482 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6236094482). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T15:51:01Z. --- Full CI on 3811293e7 (run 39046442206): Linux is green, but Windows fails `guest_fopen_long_host_path` with `fopen mode rb failed: guest errno=20, resolved characters=11` / `fopen rejected a valid mapped long host path`. This looks like the new relative-alias case (GuestFopenLongHostPath.cpp:99-106), not the fix itself. On the Windows runner ctest runs under `D:\a\AnyPS5`, while `temp_directory_path()` is most likely on `C:`. Across drive roots `std::filesystem::relative(deep, current_path())` returns an empty path, so the alias maps to the cwd and the open fails. A single-drive local run can't show it. Could you make that case same-drive? For example, set `current_path` to the temp directory for that case and restore it afterwards, or `Require(!relative.empty())` and build the relative path from a base on the same drive. The production change itself looks good.
Amoenus commented 2026-10-17 16:00:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T16:00:37Z.


@oneandonlydean confirmed; thank you for catching the split-drive assumption. I reproduced the exact errno=20, resolved characters=11 failure 3/3 with cwd on a temporary Z: substitution and temp files on C:.

Fixed in a44455b740: the relative case temporarily changes cwd to its fixture root, rejects an empty relative path, and restores/verifies the original cwd. The same split-drive control now passes 3/3; the substitution is cleaned up. Normal Windows CTest also passes.

The branch is rebased onto main66702f1c, including #7068's errno handling. Current-head full local relinker/library builds pass on Windows and Linux, with 36/18 focused passes respectively. Conventions/registration pass; static analysis has no new findings. Description updated with exact pins and coverage limits. Could you rerun full CI on this head?

Additional correction now at cf84fc44a8f969bb39cc079c0e9b8c7abfc27207: while validating #7196, an independent existing-namespace control found that this toolchain's absolute rewrites an already-extended path. The same new case failed3/3 in our opener. We now preserve namespace prefixes before that operation. Full local Windows/Linux builds and36/18 focused passes, plus3 split-drive passes, are repeated on cf84; static analysis remains at3 unchanged-code Cppcheck advisories and no selected clang-tidy diagnostics, without parser failures. Please use cf84 for the requested full CI rerun. The description retains the earlier controls and their pins.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6236240864 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7187#issuecomment-6236240864). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T16:00:37Z. --- @oneandonlydean confirmed; thank you for catching the split-drive assumption. I reproduced the exact `errno=20, resolved characters=11` failure 3/3 with cwd on a temporary `Z:` substitution and temp files on `C:`. Fixed in [a44455b740](https://github.com/Amoenus/AnyPS5/commit/a44455b74084eef4a5d7843f53d67b86a721364f): the relative case temporarily changes cwd to its fixture root, rejects an empty relative path, and restores/verifies the original cwd. The same split-drive control now passes 3/3; the substitution is cleaned up. Normal Windows CTest also passes. The branch is rebased onto main66702f1c, including #7068's errno handling. Current-head full local relinker/library builds pass on Windows and Linux, with 36/18 focused passes respectively. Conventions/registration pass; static analysis has no new findings. Description updated with exact pins and coverage limits. Could you rerun full CI on this head? Additional correction now at `cf84fc44a8f969bb39cc079c0e9b8c7abfc27207`: while validating #7196, an independent existing-namespace control found that this toolchain's `absolute` rewrites an already-extended path. The same new case failed3/3 in our opener. We now preserve namespace prefixes before that operation. Full local Windows/Linux builds and36/18 focused passes, plus3 split-drive passes, are repeated on cf84; static analysis remains at3 unchanged-code Cppcheck advisories and no selected clang-tidy diagnostics, without parser failures. Please use cf84 for the requested full CI rerun. The description retains the earlier controls and their pins.
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!7187
No description provided.