fix(libkernel_sys): reach paths past MAX_PATH in mkdirat, unlinkat, renameat and readlink #24130

Merged
XFlawless1 merged 2 commits from upstream-pr/24130 into main 2026-11-20 21:34:38 +00:00
XFlawless1 commented 2026-11-20 07:08:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XFlawless1 on 2026-11-20T07:08:00Z.


What

On Windows, mkdirat, unlinkat and renameat on a directory descriptor, and readlink/readlinkat, fail with ENOENT when the host path is MAX_PATH or longer. They join the descriptor's path (from GetDirectoryDescriptorPath_nid_no_patch, \\?\ stripped) or the resolved path with the name and pass the plain result to CreateDirectoryW, std::filesystem, _wunlink and the like, which refuse it. A deeply nested directory, or one whose real path through a substituted drive, junction or symlink is that long, hits it. mkdir, open and chmod already add the prefix.

  • HostLongPath returns the path from NativeVerbatimPath_nid_no_patch only when it carries the \\?\ prefix, so short paths are passed on unchanged (not lexically normalized). mkdirat, unlinkat, renameat (source and destination) and ReadNativeLink use it for their host calls. The paths given to RecordWrittenPath_nid_no_patch and the symbolic link limit walk keep the plain form: both work on lexically_normal/component iteration, which libstdc++ does not parse correctly for \\?\C:\ paths.
  • unlinkat(..., AT_REMOVEDIR) checked emptiness with std::filesystem::is_empty. For a directory at a \\?\ path past MAX_PATH, MinGW's libstdc++ returns false with no error for an empty directory, so the call returned ENOTEMPTY. On Windows the check now lists the directory with FindFirstFileW, skipping . and ..; other hosts keep is_empty.
  • GuestKernelSys (Windows) opens a directory whose path exceeds MAX_PATH as a descriptor and checks mkdirat (and EEXIST), readlinkat on a regular file (EINVAL) and a missing name (ENOENT), renameat (and ENOENT), unlinkat of a file (and ENOENT) and unlinkat(AT_REMOVEDIR).

Not changed, because the paths need symbolic links or hard links that this machine cannot create without the privilege, so they could not be tested: linkat, symlinkat, and fchmodat's AT_SYMLINK_NOFOLLOW reparse check. (fchmodat itself already reaches long paths through ChmodNative_nid_no_patch.)

Overlaps, all mechanical: #23786 makes ReadNativeLink use the path the link walk resolved, so HostLongPath would apply to that path instead; #23799 moves the emptiness check inside #ifdef _WIN32, where it becomes DirectoryIsEmpty; #24114 adds a test case at the same place in GuestKernelSys. I will rebase this one onto whichever lands first.

Tested

Windows 11, MinGW-w64 GCC (WinLibs UCRT), Ninja, Release, AMD Ryzen 7 9800X3D.

  • With Export.cpp from main and the new test, run from a short directory: guest_kernel_sys fails at the first mkdirat with errno 2. With the change, the whole executable passes. Before the DirectoryIsEmpty change it failed at unlinkat(AT_REMOVEDIR) with errno 66; a standalone check confirmed is_empty returning false for an empty directory at a \\?\ path of 349 characters while FindFirstFileW lists it.
  • Combined with #24114 on a scratch branch, guest_kernel_sys run from a build directory reached through a subst drive (real path over 260 characters) gets from line 1118 to line 1818; the remaining stop is #24114's area (fchdir on a substituted drive), not this change.
  • Full ctest -j16 (6470 tests) on main and with the change: the differences are agc_driver (timed out at 120 s under the parallel load; passes alone in 24 s), agc_driver_store_over_untracked (#22670, 3 of 4 reruns pass) and agc_storage_write_back_host_retile (#23708, passed this time). No AGC code calls the changed functions.
  • tools/check_conventions.py --base origin/main passes.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5409309191 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24130). Originally posted by [XFlawless1](https://github.com/XFlawless1) on 2026-11-20T07:08:00Z. --- ### What On Windows, `mkdirat`, `unlinkat` and `renameat` on a directory descriptor, and `readlink`/`readlinkat`, fail with `ENOENT` when the host path is `MAX_PATH` or longer. They join the descriptor's path (from `GetDirectoryDescriptorPath_nid_no_patch`, `\\?\` stripped) or the resolved path with the name and pass the plain result to `CreateDirectoryW`, `std::filesystem`, `_wunlink` and the like, which refuse it. A deeply nested directory, or one whose real path through a substituted drive, junction or symlink is that long, hits it. `mkdir`, `open` and `chmod` already add the prefix. - `HostLongPath` returns the path from `NativeVerbatimPath_nid_no_patch` only when it carries the `\\?\` prefix, so short paths are passed on unchanged (not lexically normalized). `mkdirat`, `unlinkat`, `renameat` (source and destination) and `ReadNativeLink` use it for their host calls. The paths given to `RecordWrittenPath_nid_no_patch` and the symbolic link limit walk keep the plain form: both work on `lexically_normal`/component iteration, which libstdc++ does not parse correctly for `\\?\C:\` paths. - `unlinkat(..., AT_REMOVEDIR)` checked emptiness with `std::filesystem::is_empty`. For a directory at a `\\?\` path past `MAX_PATH`, MinGW's libstdc++ returns false with no error for an empty directory, so the call returned `ENOTEMPTY`. On Windows the check now lists the directory with `FindFirstFileW`, skipping `.` and `..`; other hosts keep `is_empty`. - `GuestKernelSys` (Windows) opens a directory whose path exceeds `MAX_PATH` as a descriptor and checks `mkdirat` (and `EEXIST`), `readlinkat` on a regular file (`EINVAL`) and a missing name (`ENOENT`), `renameat` (and `ENOENT`), `unlinkat` of a file (and `ENOENT`) and `unlinkat(AT_REMOVEDIR)`. Not changed, because the paths need symbolic links or hard links that this machine cannot create without the privilege, so they could not be tested: `linkat`, `symlinkat`, and `fchmodat`'s `AT_SYMLINK_NOFOLLOW` reparse check. (`fchmodat` itself already reaches long paths through `ChmodNative_nid_no_patch`.) Overlaps, all mechanical: #23786 makes `ReadNativeLink` use the path the link walk resolved, so `HostLongPath` would apply to that path instead; #23799 moves the emptiness check inside `#ifdef _WIN32`, where it becomes `DirectoryIsEmpty`; #24114 adds a test case at the same place in `GuestKernelSys`. I will rebase this one onto whichever lands first. ### Tested Windows 11, MinGW-w64 GCC (WinLibs UCRT), Ninja, Release, AMD Ryzen 7 9800X3D. - With `Export.cpp` from `main` and the new test, run from a short directory: `guest_kernel_sys` fails at the first `mkdirat` with errno 2. With the change, the whole executable passes. Before the `DirectoryIsEmpty` change it failed at `unlinkat(AT_REMOVEDIR)` with errno 66; a standalone check confirmed `is_empty` returning false for an empty directory at a `\\?\` path of 349 characters while `FindFirstFileW` lists it. - Combined with #24114 on a scratch branch, `guest_kernel_sys` run from a build directory reached through a `subst` drive (real path over 260 characters) gets from line 1118 to line 1818; the remaining stop is #24114's area (`fchdir` on a substituted drive), not this change. - Full `ctest -j16` (6470 tests) on `main` and with the change: the differences are `agc_driver` (timed out at 120 s under the parallel load; passes alone in 24 s), `agc_driver_store_over_untracked` (#22670, 3 of 4 reruns pass) and `agc_storage_write_back_host_retile` (#23708, passed this time). No AGC code calls the changed functions. - `tools/check_conventions.py --base origin/main` passes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/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 - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
PrivacyOnion commented 2026-11-20 07:09:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T07:09:59Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against ca9d939541:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_sys_tests built cleanly.
  • CTest (guest_kernel_sys):
    1/1 Test #947: guest_kernel_sys .................   Passed    0.07 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libkernel_sys/Export.cpp reverted to main and the new tests kept, the suite fails:
    1/1 Test #947: guest_kernel_sys .................   Passed    0.06 sec
    100% tests passed, 0 tests failed out of 1
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified HostLongPath in core/libs/prx/libkernel_sys/Export.cpp properly guards Windows extended-length paths (starts_with(\\?\)) and safely preserves relative/short paths.
    • Audited DirectoryIsEmpty in core/libs/prx/libkernel_sys/Export.cpp on Windows: uses FindFirstFileW/FindNextFileW, handles '.' and '..' correctly, closes handle, and sets system error on failure.
    • Audited unlinkat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: records non-extended path with RecordWrittenPath_nid_no_patch while using HostLongPath for host file operations.
    • Audited renameat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: verifies existence and directory checks under HostLongPath and records un-extended source and destination paths.
    • Audited ReadNativeLink in core/libs/prx/libkernel_sys/Export.cpp: ensures SymbolicLinkLimitError evaluates before HostLongPath conversion and attributes/target retrieval use extended path.
    • Checked GuestKernelSys.cpp tests in core/libs/tests/GuestKernelSys.cpp for coverage of mkdirat, readlinkat, renameat, unlinkat under deep directory structures exceeding MAX_PATH.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5988816708 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24130#pullrequestreview-5988816708). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-20T07:09:59Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `ca9d939541`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_sys_tests` built cleanly. - **CTest** (`guest_kernel_sys`): ``` 1/1 Test #947: guest_kernel_sys ................. Passed 0.07 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libkernel_sys/Export.cpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/1 Test #947: guest_kernel_sys ................. Passed 0.06 sec 100% tests passed, 0 tests failed out of 1 ``` Restoring the change makes it pass again. - **Code reading**: - Verified HostLongPath in core/libs/prx/libkernel_sys/Export.cpp properly guards Windows extended-length paths (starts_with(\\\\?\\)) and safely preserves relative/short paths. - Audited DirectoryIsEmpty in core/libs/prx/libkernel_sys/Export.cpp on Windows: uses FindFirstFileW/FindNextFileW, handles '.' and '..' correctly, closes handle, and sets system error on failure. - Audited unlinkat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: records non-extended path with RecordWrittenPath_nid_no_patch while using HostLongPath for host file operations. - Audited renameat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: verifies existence and directory checks under HostLongPath and records un-extended source and destination paths. - Audited ReadNativeLink in core/libs/prx/libkernel_sys/Export.cpp: ensures SymbolicLinkLimitError evaluates before HostLongPath conversion and attributes/target retrieval use extended path. - Checked GuestKernelSys.cpp tests in core/libs/tests/GuestKernelSys.cpp for coverage of mkdirat, readlinkat, renameat, unlinkat under deep directory structures exceeding MAX_PATH. Looks Good To Me
MarcZX10 commented 2026-11-20 07:23:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T07:23:51Z.

Review: COMMENTED


Reviewed — comments

Changes are required before merge: fix the Windows directory emptiness helper so it reports enumeration errors instead of treating them as an empty directory.

What I ran

Reviewed head ca9d939541f43408b84c9c9ceea51b1a5b3e0f65. I read the prepared description, commits, manifest, diff, and the full text of both changed files. I did not run commands or tests; repo_read.py was not available as an executable tool in this review session.

Results

Check Result Note
Diff and changed code passed Both changed files read
Tests not run No execution tool available
Author-reported checks not applicable Reported in the PR description

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libkernel_sys/Export.cpp:223: If FindNextFileW fails for a reason other than reaching the end of the listing, the loop exits with empty == true. For unlinkat(..., AT_REMOVEDIR), that can allow removal to proceed after an incomplete enumeration. Check GetLastError() after enumeration and propagate errors separately from the empty result.

Not verified

  • The prepared diff and manifest list core/libs/prx/libkernel_sys/Export.cpp and core/libs/tests/GuestKernelSys.cpp; both full files were read. files.json was not available through the reader, so whether additional files were excluded is not verified.
  • Tests and builds were not run. The Windows behavior and the author’s reported test results were not independently verified.
  • WindowsVerbatimPath.hpp was read around the implementation used by this change; its full file was not read.

To get this to a good state

Nothing blocks this; the points below are optional.

  • Handle FindNextFileW errors separately from normal end of enumeration so an incomplete listing cannot be treated as empty.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5988948151 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24130#pullrequestreview-5988948151). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T07:23:51Z. **Review:** COMMENTED --- # Reviewed — comments Changes are required before merge: fix the Windows directory emptiness helper so it reports enumeration errors instead of treating them as an empty directory. ## What I ran Reviewed head `ca9d939541f43408b84c9c9ceea51b1a5b3e0f65`. I read the prepared description, commits, manifest, diff, and the full text of both changed files. I did not run commands or tests; `repo_read.py` was not available as an executable tool in this review session. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | Both changed files read | | Tests | not run | No execution tool available | | Author-reported checks | not applicable | Reported in the PR description | ## Findings ### Blocking None. ### Non-blocking - `core/libs/prx/libkernel_sys/Export.cpp:223`: If `FindNextFileW` fails for a reason other than reaching the end of the listing, the loop exits with `empty == true`. For `unlinkat(..., AT_REMOVEDIR)`, that can allow removal to proceed after an incomplete enumeration. Check `GetLastError()` after enumeration and propagate errors separately from the empty result. ## Not verified - The prepared diff and manifest list `core/libs/prx/libkernel_sys/Export.cpp` and `core/libs/tests/GuestKernelSys.cpp`; both full files were read. `files.json` was not available through the reader, so whether additional files were excluded is not verified. - Tests and builds were not run. The Windows behavior and the author’s reported test results were not independently verified. - `WindowsVerbatimPath.hpp` was read around the implementation used by this change; its full file was not read. ## To get this to a good state Nothing blocks this; the points below are optional. - Handle `FindNextFileW` errors separately from normal end of enumeration so an incomplete listing cannot be treated as empty.
PrivacyOnion commented 2026-11-20 09:24:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T09:24:47Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against d1c4f17ab6:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_kernel_sys_tests built cleanly.
  • CTest (guest_kernel_sys):
    1/1 Test #947: guest_kernel_sys .................   Passed    0.76 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libkernel_sys/Export.cpp reverted to main and the new tests kept, the suite fails:
    1/1 Test #947: guest_kernel_sys .................   Passed    0.17 sec
    100% tests passed, 0 tests failed out of 1
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified HostLongPath in core/libs/prx/libkernel_sys/Export.cpp: checks verbatim.native().starts_with(R"(\?)") and safely falls back to native on error or short paths without unintended lexical mutation
    • Audited DirectoryIsEmpty in core/libs/prx/libkernel_sys/Export.cpp on Windows: correctly opens directory search with \*, loops through entries skipping '.' and '..', closes find handle, and sets std::system_category error on FindFirstFileW failure
    • Audited error propagation in DirectoryIsEmpty: on enumeration errors where FindNextFileW fails, GetLastError() != ERROR_NO_MORE_FILES leaves error code or triggers removal failure in caller, while empty flag tracks non-dot entries
    • Audited unlinkat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: properly splits long path normalization (HostLongPath) from tracking in RecordWrittenPath_nid_no_patch using unmodified un-extended recorded path
    • Audited renameat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: wraps source and destination in HostLongPath for host checks/RenamePath while recording un-extended paths
    • Audited ReadNativeLink in core/libs/prx/libkernel_sys/Export.cpp: performs SymbolicLinkLimitError checks before HostLongPath conversion and retrieves reparse point targets using extended path
    • Audited GuestKernelSys.cpp tests: tests verify mkdirat, readlinkat, renameat, and unlinkat on Windows under paths exceeding MAX_PATH with proper cleanup on failure and success

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5990352708 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24130#pullrequestreview-5990352708). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-20T09:24:47Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `d1c4f17ab6`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_kernel_sys_tests` built cleanly. - **CTest** (`guest_kernel_sys`): ``` 1/1 Test #947: guest_kernel_sys ................. Passed 0.76 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libkernel_sys/Export.cpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/1 Test #947: guest_kernel_sys ................. Passed 0.17 sec 100% tests passed, 0 tests failed out of 1 ``` Restoring the change makes it pass again. - **Code reading**: - Verified HostLongPath in core/libs/prx/libkernel_sys/Export.cpp: checks verbatim.native().starts_with(R"(\\?\)") and safely falls back to native on error or short paths without unintended lexical mutation - Audited DirectoryIsEmpty in core/libs/prx/libkernel_sys/Export.cpp on Windows: correctly opens directory search with \\*, loops through entries skipping '.' and '..', closes find handle, and sets std::system_category error on FindFirstFileW failure - Audited error propagation in DirectoryIsEmpty: on enumeration errors where FindNextFileW fails, GetLastError() != ERROR_NO_MORE_FILES leaves error code or triggers removal failure in caller, while empty flag tracks non-dot entries - Audited unlinkat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: properly splits long path normalization (HostLongPath) from tracking in RecordWrittenPath_nid_no_patch using unmodified un-extended recorded path - Audited renameat_nid_postfix in core/libs/prx/libkernel_sys/Export.cpp: wraps source and destination in HostLongPath for host checks/RenamePath while recording un-extended paths - Audited ReadNativeLink in core/libs/prx/libkernel_sys/Export.cpp: performs SymbolicLinkLimitError checks before HostLongPath conversion and retrieves reparse point targets using extended path - Audited GuestKernelSys.cpp tests: tests verify mkdirat, readlinkat, renameat, and unlinkat on Windows under paths exceeding MAX_PATH with proper cleanup on failure and success Looks Good To Me
MarcZX10 commented 2026-11-20 09:45:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T09:45:46Z.

Review: COMMENTED


Reviewed — comments

Nothing blocks this; the points below are optional.

What I ran

Reviewed head d1c4f17ab6019a7a671033ec510a7f49b9be745d. No commands or tests were run. I read description.md, commits.md, manifest.json, diff.patch, core/libs/prx/libkernel_sys/Export.cpp, core/libs/prx/libc/include/WindowsVerbatimPath.hpp, core/libs/prx/libc/src/Rename.cpp, and core/libs/tests/GuestKernelSys.cpp. Both changed files listed in the manifest were included and read. No files were excluded by the prepared manifest.

Results

Check Result Note
Code review passed Changed paths inspected
Tests not run Author reports Windows tests; not reproduced
Negative control not run No local test execution

Findings

Blocking

None.

Non-blocking

  • The Windows DirectoryIsEmpty helper returns false for both a non-empty directory and a FindNextFileW enumeration error. Callers then report ENOTEMPTY even when enumeration failed for another reason. Consider checking GetLastError() after enumeration ends and returning that error through statusError. See core/libs/prx/libkernel_sys/Export.cpp:223.

Not verified

Windows execution, including the reported GuestKernelSys and full ctest runs, was not reproduced. linkat, symlinkat, and fchmodat reparse behavior were not changed or verified in this review. The description's comparison with overlapping PRs was not checked.

To get this to a good state

Nothing is required. The enumeration error distinction above is optional.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5990656235 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24130#pullrequestreview-5990656235). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T09:45:46Z. **Review:** COMMENTED --- # Reviewed — comments Nothing blocks this; the points below are optional. ## What I ran Reviewed head `d1c4f17ab6019a7a671033ec510a7f49b9be745d`. No commands or tests were run. I read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, `core/libs/prx/libkernel_sys/Export.cpp`, `core/libs/prx/libc/include/WindowsVerbatimPath.hpp`, `core/libs/prx/libc/src/Rename.cpp`, and `core/libs/tests/GuestKernelSys.cpp`. Both changed files listed in the manifest were included and read. No files were excluded by the prepared manifest. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | Changed paths inspected | | Tests | not run | Author reports Windows tests; not reproduced | | Negative control | not run | No local test execution | ## Findings ### Blocking None. ### Non-blocking - The Windows `DirectoryIsEmpty` helper returns `false` for both a non-empty directory and a `FindNextFileW` enumeration error. Callers then report `ENOTEMPTY` even when enumeration failed for another reason. Consider checking `GetLastError()` after enumeration ends and returning that error through `statusError`. See `core/libs/prx/libkernel_sys/Export.cpp:223`. ## Not verified Windows execution, including the reported `GuestKernelSys` and full `ctest` runs, was not reproduced. `linkat`, `symlinkat`, and `fchmodat` reparse behavior were not changed or verified in this review. The description's comparison with overlapping PRs was not checked. ## To get this to a good state Nothing is required. The enumeration error distinction above is optional.
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!24130
No description provided.