fix(libc): follow a Windows symbolic link before .. in a guest path #9371

Closed
cadenasynyster wants to merge 1 commit from upstream-pr/9371 into main
cadenasynyster commented 2026-10-21 19:31:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by cadenasynyster on 2026-10-21T19:31:51Z.


What

On Windows, .. after a directory symbolic link whose target is missing resolved lexically to the link's parent, so stat("dir/dangling-link/../present.txt") did not fail. FreeBSD 11.4's lookup() (sys/kern/vfs_lookup.c) follows the link before it handles .., so the call fails with ENOENT.

RequireHostDirectory in core/libs/prx/libc/src/General.cpp checks the component before .. with std::filesystem::status, which on MinGW reads the link's own attributes, and a Windows directory symbolic link carries FILE_ATTRIBUTE_DIRECTORY whether its target exists or not. On Windows it now opens a reparse point with CreateFileW and FILE_FLAG_BACKUP_SEMANTICS, which follows it, and decides from the target: a directory passes, a file gives ENOTDIR, a missing target ENOENT, and a loop (ERROR_CANT_RESOLVE_FILENAME) ELOOP. Any other open error falls through to the existing check. Components that are not reparse points, and Linux and macOS, are unchanged.

The test for this in guest_filesystem (TestParentTraversal: directory-link, file-link, dangling-link) never ran on Windows. It creates its links with std::filesystem::create_directory_symlink and create_symlink, which MinGW's libstdc++ (GCC 15) does not implement on Windows (create_directory_symlink returns function_not_supported under _GLIBCXX_FILESYSTEM_IS_WINDOWS, and create_symlink does the same without _GLIBCXX_HAVE_SYMLINK). On Windows the block now creates them with CreateSymbolicLinkW and SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, as the later link checks in the same file do. It also deletes them with DeleteFileW and RemoveDirectoryW before the fixture's remove_all. With the dangling link left in place, remove_all threw a filesystem_error that ended the test; docs/dev/debt/libs.md records the same MinGW problem for GuestKernelSys.cpp. TestParentTraversal also covers a self-referencing directory link and a two-link loop before .., which fail with ELOOP.

Tested

Windows 11 10.0.26300, WinLibs MinGW-w64 GCC 15.2.0 r7, CMake + Ninja, Release, -DBUILD_TESTING=ON, unelevated PowerShell with Developer Mode on, on main 1896871ba, then rebased onto d6e7ab42d.

  • On the previous head, with main's General.cpp and this PR's test: guest_filesystem fails with Filesystem check failed at line 194, the first check of the dangling-link/.. case (stat of dangling-link/../present.txt does not fail with ENOENT). The file-link/.. cases already pass there with ENOTDIR.
  • On the previous head with this PR: guest_filesystem passes 3 of 3. The log shows resolveError=20 for every file-link/.. open and resolveError=2 for every dangling-link/.. open.
  • On the previous head with the fix, these 27 path tests also passed (not re-run after the rebase): guest_kernel_sys, guest_file_timestamps, guest_posix_filesystem, guest_directory, guest_directory_rewind, guest_directory_close, guest_directory_buffer, file_streams, file_position, file_identity, guest_kernel_rename, guest_rename_dot, guest_realpath, guest_working_directory, guest_path_case, guest_path_drive_component, guest_path_name_length, guest_statvfs, guest_fstatvfs, guest_fstatfs, guest_fdopendir, guest_fiopen, guest_fopen_long_host_path, guest_shm_open, guest_savedata_mount_status, savedata_replace_file_failure, guest_system_service_path_boundary.
  • On the rebased head, guest_filesystem and guest_kernel_sys pass 3 of 3 runs, and python tools/check_conventions.py --base origin/main passes.
  • Loop before .. (directory links self-loop to itself and loop-a to loop-b to loop-a, next to present.txt), measured with a temporary probe that is not in this PR: with this PR, stat of self-loop/../present.txt and loop-a/../present.txt fails with ELOOP (62) and sceKernelStat returns 0x8002003E; with main's General.cpp both calls return 0. The two loop cases in TestParentTraversal are regression coverage. With main's General.cpp the test fails at an earlier check, so it is not an isolated negative control for them.
  • A file-type link whose target is a directory (created without SYMBOLIC_LINK_FLAG_DIRECTORY): CreateFileW fails with ERROR_ACCESS_DENIED (5), so link/../present.txt and link/ fail with ENOTDIR and link itself with EACCES, where FreeBSD, which has one link type, follows it. Not fixed here; recorded in docs/dev/debt/libc.md. I did not compare that case with main.
  • Not tested: a directory junction, Linux and macOS (the new code and test lines are Windows-only), the full CTest run, and a title.
  • tools/pr_overlap.py was not run here: it needs gh, which is not installed on this machine. #9109 changes Resolve in the same file, and #8797 and #8550 edit other parts of GuestFilesystem.cpp; neither touches RequireHostDirectory or this link block.

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
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4957227067 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9371). Originally posted by [cadenasynyster](https://github.com/cadenasynyster) on 2026-10-21T19:31:51Z. --- ### What On Windows, `..` after a directory symbolic link whose target is missing resolved lexically to the link's parent, so `stat("dir/dangling-link/../present.txt")` did not fail. FreeBSD 11.4's `lookup()` ([`sys/kern/vfs_lookup.c`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/sys/kern/vfs_lookup.c)) follows the link before it handles `..`, so the call fails with `ENOENT`. `RequireHostDirectory` in `core/libs/prx/libc/src/General.cpp` checks the component before `..` with `std::filesystem::status`, which on MinGW reads the link's own attributes, and a Windows directory symbolic link carries `FILE_ATTRIBUTE_DIRECTORY` whether its target exists or not. On Windows it now opens a reparse point with `CreateFileW` and `FILE_FLAG_BACKUP_SEMANTICS`, which follows it, and decides from the target: a directory passes, a file gives `ENOTDIR`, a missing target `ENOENT`, and a loop (`ERROR_CANT_RESOLVE_FILENAME`) `ELOOP`. Any other open error falls through to the existing check. Components that are not reparse points, and Linux and macOS, are unchanged. The test for this in `guest_filesystem` (`TestParentTraversal`: `directory-link`, `file-link`, `dangling-link`) never ran on Windows. It creates its links with `std::filesystem::create_directory_symlink` and `create_symlink`, which MinGW's libstdc++ (GCC 15) does not implement on Windows (`create_directory_symlink` returns `function_not_supported` under `_GLIBCXX_FILESYSTEM_IS_WINDOWS`, and `create_symlink` does the same without `_GLIBCXX_HAVE_SYMLINK`). On Windows the block now creates them with `CreateSymbolicLinkW` and `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE`, as the later link checks in the same file do. It also deletes them with `DeleteFileW` and `RemoveDirectoryW` before the fixture's `remove_all`. With the dangling link left in place, `remove_all` threw a `filesystem_error` that ended the test; `docs/dev/debt/libs.md` records the same MinGW problem for `GuestKernelSys.cpp`. `TestParentTraversal` also covers a self-referencing directory link and a two-link loop before `..`, which fail with `ELOOP`. ### Tested Windows 11 10.0.26300, WinLibs MinGW-w64 GCC 15.2.0 r7, CMake + Ninja, Release, `-DBUILD_TESTING=ON`, unelevated PowerShell with Developer Mode on, on `main` 1896871ba, then rebased onto d6e7ab42d. - On the previous head, with `main`'s `General.cpp` and this PR's test: `guest_filesystem` fails with `Filesystem check failed at line 194`, the first check of the `dangling-link/..` case (`stat` of `dangling-link/../present.txt` does not fail with `ENOENT`). The `file-link/..` cases already pass there with `ENOTDIR`. - On the previous head with this PR: `guest_filesystem` passes 3 of 3. The log shows `resolveError=20` for every `file-link/..` open and `resolveError=2` for every `dangling-link/..` open. - On the previous head with the fix, these 27 path tests also passed (not re-run after the rebase): `guest_kernel_sys`, `guest_file_timestamps`, `guest_posix_filesystem`, `guest_directory`, `guest_directory_rewind`, `guest_directory_close`, `guest_directory_buffer`, `file_streams`, `file_position`, `file_identity`, `guest_kernel_rename`, `guest_rename_dot`, `guest_realpath`, `guest_working_directory`, `guest_path_case`, `guest_path_drive_component`, `guest_path_name_length`, `guest_statvfs`, `guest_fstatvfs`, `guest_fstatfs`, `guest_fdopendir`, `guest_fiopen`, `guest_fopen_long_host_path`, `guest_shm_open`, `guest_savedata_mount_status`, `savedata_replace_file_failure`, `guest_system_service_path_boundary`. - On the rebased head, `guest_filesystem` and `guest_kernel_sys` pass 3 of 3 runs, and `python tools/check_conventions.py --base origin/main` passes. - Loop before `..` (directory links `self-loop` to itself and `loop-a` to `loop-b` to `loop-a`, next to `present.txt`), measured with a temporary probe that is not in this PR: with this PR, `stat` of `self-loop/../present.txt` and `loop-a/../present.txt` fails with `ELOOP` (62) and `sceKernelStat` returns `0x8002003E`; with `main`'s `General.cpp` both calls return 0. The two loop cases in `TestParentTraversal` are regression coverage. With `main`'s `General.cpp` the test fails at an earlier check, so it is not an isolated negative control for them. - A file-type link whose target is a directory (created without `SYMBOLIC_LINK_FLAG_DIRECTORY`): `CreateFileW` fails with `ERROR_ACCESS_DENIED` (5), so `link/../present.txt` and `link/` fail with `ENOTDIR` and `link` itself with `EACCES`, where FreeBSD, which has one link type, follows it. Not fixed here; recorded in `docs/dev/debt/libc.md`. I did not compare that case with `main`. - Not tested: a directory junction, Linux and macOS (the new code and test lines are Windows-only), the full CTest run, and a title. - `tools/pr_overlap.py` was not run here: it needs `gh`, which is not installed on this machine. #9109 changes `Resolve` in the same file, and #8797 and #8550 edit other parts of `GuestFilesystem.cpp`; neither touches `RequireHostDirectory` or this link block. ### 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) - [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
wachi35676 commented 2026-10-21 23:40:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-21T23:40:00Z.


Windows run with a negative control, and the ELOOP path, which the test doesn't cover.

Head 23b2528f6f merged onto main a6dcea927 (clean). Windows 11 Home 10.0.26300, Ryzen 5 9600X, WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Unelevated, Developer Mode on, so CreateSymbolicLinkW with ALLOW_UNPRIVILEGED_CREATE works and the link cases run.

  • guest_filesystem, guest_kernel_sys: 2/2, 3 runs.
  • Negative control: with libc/src/General.cpp from main, guest_filesystem fails at line 194 (Filesystem check failed at line 194 (guest errno 2, Win32 error 0), in checkInvalid).
  • check_conventions.py --base a6dcea927: passes.

Loops are not reported as ELOOP. Probe: directory links loop-a → loop-b → loop-a, and self → self, next to present.txt:

CreateFileW follow: handle invalid, GetLastError=1921      (loop-a, and the same for self)
stat(<root>/loop-a/../present.txt) ret=0
stat(<root>/self/../present.txt)   ret=0

So CreateFileW does fail with ERROR_CANT_RESOLVE_FILENAME (1921), the code this PR maps to ELOOP. But stat through a looping link before .. still succeeds, the same as main. FreeBSD 11.4's lookup() gives ELOOP there. A dangling link works as described (the test's dangling-link case). I did not trace which path skips RequireHostDirectory for the loop. A loop-a/.. case in TestParentTraversal would show it.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329016190 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9371#issuecomment-6329016190). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-21T23:40:00Z. --- Windows run with a negative control, and the `ELOOP` path, which the test doesn't cover. Head `23b2528f6f` merged onto main `a6dcea927` (clean). Windows 11 Home 10.0.26300, Ryzen 5 9600X, WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release, `BUILD_TESTING=ON`. Unelevated, Developer Mode on, so `CreateSymbolicLinkW` with `ALLOW_UNPRIVILEGED_CREATE` works and the link cases run. - `guest_filesystem`, `guest_kernel_sys`: 2/2, 3 runs. - Negative control: with `libc/src/General.cpp` from main, `guest_filesystem` fails at line 194 (`Filesystem check failed at line 194 (guest errno 2, Win32 error 0)`, in `checkInvalid`). - `check_conventions.py --base a6dcea927`: passes. **Loops are not reported as `ELOOP`.** Probe: directory links `loop-a` → `loop-b` → `loop-a`, and `self` → `self`, next to `present.txt`: ``` CreateFileW follow: handle invalid, GetLastError=1921 (loop-a, and the same for self) stat(<root>/loop-a/../present.txt) ret=0 stat(<root>/self/../present.txt) ret=0 ``` So `CreateFileW` does fail with `ERROR_CANT_RESOLVE_FILENAME` (1921), the code this PR maps to `ELOOP`. But `stat` through a looping link before `..` still succeeds, the same as main. FreeBSD 11.4's `lookup()` gives `ELOOP` there. A dangling link works as described (the test's `dangling-link` case). I did not trace which path skips `RequireHostDirectory` for the loop. A `loop-a/..` case in `TestParentTraversal` would show it. AI-assisted: yes (Claude Code); results above were run on this machine.
MarcZX10 commented 2026-10-22 06:54:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T06:54:33Z.

Review: CHANGES_REQUESTED


I reviewed the Windows path change and the current checks. Checks I ran on head 23b2528f6fa1431893b643acb08b4254afab5256: - python3 tools/check_conventions.py --base upstream/main --head refs/review/9371: passed. - git diff --check upstream/main...HEAD: passed. - cmake -S. -B /tmp/AnyPS5-9371-review/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON: configuration could not complete because this checkout lacks the SDL2 submodule's CMakeLists.txt and the host lacks XRandR support. I therefore could not run guest_filesystem locally. The hosted relinker matrix and register-context checks pass, but the full Linux and Windows jobs are skipped; those results do not validate this libc change. The Windows focused run in the PR and the independent Windows run are useful evidence for the dangling-link case. There is still a correctness gap in the stated FreeBSD behavior. The independent Windows probe reports that stat("loop-a/../present.txt") and stat("self/../present.txt") succeed for directory-link loops, although CreateFileW itself returns ERROR_CANT_RESOLVE_FILENAME (1921), which this change intends to map to ELOOP. Please trace why the path reaches a successful stat, add self-loop and two-link-loop cases to TestParentTraversal, and make the guest calls return ELOOP before treating the behavior as covered. The PR’s own probe also reports a file-type link pointing at a directory yields ENOTDIR for link/.., unlike the FreeBSD target behavior; please test and document/resolve that edge case as well. The branch is 514 commits behind current main, while CONTRIBUTING.md requires keeping a PR branch current. The overlap scan could not compare GuestFilesystem.cpp with open #7530 and #9095 because those PRs already conflict with the base. I manually checked their changed test regions: their junction-removal fixture is separate from this TestParentTraversal fixture; #8797 also merges cleanly in the pairwise tree check. Please rerun overlap checks after rebasing.

I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5610307965 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9371#pullrequestreview-5610307965). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T06:54:33Z. **Review:** CHANGES_REQUESTED --- I reviewed the Windows path change and the current checks. Checks I ran on head `23b2528f6fa1431893b643acb08b4254afab5256`: - `python3 tools/check_conventions.py --base upstream/main --head refs/review/9371`: passed. - `git diff --check upstream/main...HEAD`: passed. - `cmake -S. -B /tmp/AnyPS5-9371-review/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON`: configuration could not complete because this checkout lacks the SDL2 submodule's `CMakeLists.txt` and the host lacks XRandR support. I therefore could not run `guest_filesystem` locally. The hosted relinker matrix and register-context checks pass, but the full Linux and Windows jobs are skipped; those results do not validate this libc change. The Windows focused run in the PR and the independent Windows run are useful evidence for the dangling-link case. There is still a correctness gap in the stated FreeBSD behavior. The independent Windows probe reports that `stat("loop-a/../present.txt")` and `stat("self/../present.txt")` succeed for directory-link loops, although `CreateFileW` itself returns `ERROR_CANT_RESOLVE_FILENAME` (1921), which this change intends to map to `ELOOP`. Please trace why the path reaches a successful stat, add self-loop and two-link-loop cases to `TestParentTraversal`, and make the guest calls return `ELOOP` before treating the behavior as covered. The PR’s own probe also reports a file-type link pointing at a directory yields `ENOTDIR` for `link/..`, unlike the FreeBSD target behavior; please test and document/resolve that edge case as well. The branch is 514 commits behind current `main`, while `CONTRIBUTING.md` requires keeping a PR branch current. The overlap scan could not compare `GuestFilesystem.cpp` with open #7530 and #9095 because those PRs already conflict with the base. I manually checked their changed test regions: their junction-removal fixture is separate from this `TestParentTraversal` fixture; #8797 also merges cleanly in the pairwise tree check. Please rerun overlap checks after rebasing. I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.
MarcZX10 commented 2026-11-17 02:27:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T02:27:34Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

  • Head reviewed: 9ea4c6561be22466166fb26fa61cd2eb0d23f2cf, base main.
  • Read the description, commit list, manifest, file list and diff.patch, then read the head context of each changed function and its callers through the repository reader (repo_read.py).
  • Checked the house rules sections "Readable reviews", "Accuracy and evidence" and "Standard PR response format".
  • No build, no test run and no Windows toolchain in this run. The reader and text reads are the only checks.

Results

Check Result Note
Changed code read against its callers passed General.cpp, GuestFilesystem.cpp
Windows headers and symbols used passed windows.h included in both files
Debt entry matches the code passed libc.md line 141
Build and Windows tests not run author-reported only
Negative control not run no Windows build here
Linux and macOS build not applicable new code is _WIN32-only

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestFilesystem.cpp:328: the link cleanup runs only after every checkInvalid succeeds. If one of the Require checks at lines 319 or 320 fails, the test throws first and dangling-link, self-loop and the loop links stay in the test root. Nothing hangs and the fixture name is unique per run, so this only leaves files behind after a failure. The existing test has the same shape on Linux, so a scope guard is optional.

Sources

Not verified

  • Build and runs of guest_filesystem and guest_kernel_sys on Windows. The author reports 3 of 3 passes on the rebased head; I did not run them.
  • The ELOOP and ENOTDIR values for the loop and file-link cases: author measurements, not repeated here.
  • Directory junctions: not tested by the author and not checked here.
  • A trailing separator in the component path (WithTrailingSeparator at General.cpp:379): I did not check how GetFileAttributesW treats a link with a trailing separator.
  • The description says docs/dev/debt/libs.md records the same MinGW problem. The entry at line 9 covers remove and remove_all on dangling links, not the create_directory_symlink failure.
  • Files read: General.cpp (diff and lines 280–330, callers), GuestFilesystem.cpp (diff and lines 196–210 and 330–345, plus symbol search), docs/dev/debt/libc.md (diff and lines 139–141). Excluded by rule: none.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5931731031 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9371#pullrequestreview-5931731031). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T02:27:34Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran - Head reviewed: `9ea4c6561be22466166fb26fa61cd2eb0d23f2cf`, base `main`. - Read the description, commit list, manifest, file list and `diff.patch`, then read the head context of each changed function and its callers through the repository reader (`repo_read.py`). - Checked the house rules sections "Readable reviews", "Accuracy and evidence" and "Standard PR response format". - No build, no test run and no Windows toolchain in this run. The reader and text reads are the only checks. ## Results | Check | Result | Note | |---|---|---| | Changed code read against its callers | passed | `General.cpp`, `GuestFilesystem.cpp` | | Windows headers and symbols used | passed | `windows.h` included in both files | | Debt entry matches the code | passed | `libc.md` line 141 | | Build and Windows tests | not run | author-reported only | | Negative control | not run | no Windows build here | | Linux and macOS build | not applicable | new code is `_WIN32`-only | ## Findings **Blocking** None. **Non-blocking** - `core/libs/tests/GuestFilesystem.cpp:328`: the link cleanup runs only after every `checkInvalid` succeeds. If one of the `Require` checks at lines 319 or 320 fails, the test throws first and `dangling-link`, `self-loop` and the loop links stay in the test root. Nothing hangs and the fixture name is unique per run, so this only leaves files behind after a failure. The existing test has the same shape on Linux, so a scope guard is optional. ## Sources - The `..` handling and the reparse-point branch: [`General.cpp` at the head](https://github.com/boykopovar/AnyPS5/blob/9ea4c6561be22466166fb26fa61cd2eb0d23f2cf/core/libs/prx/libc/src/General.cpp#L305-L327). - The new Windows test block: [`GuestFilesystem.cpp` at the head](https://github.com/boykopovar/AnyPS5/blob/9ea4c6561be22466166fb26fa61cd2eb0d23f2cf/core/libs/tests/GuestFilesystem.cpp#L301-L331). - The documented exception for file-type links to directories: [`docs/dev/debt/libc.md` at the head](https://github.com/boykopovar/AnyPS5/blob/9ea4c6561be22466166fb26fa61cd2eb0d23f2cf/docs/dev/debt/libc.md#L141). ## Not verified - Build and runs of `guest_filesystem` and `guest_kernel_sys` on Windows. The author reports 3 of 3 passes on the rebased head; I did not run them. - The `ELOOP` and `ENOTDIR` values for the loop and file-link cases: author measurements, not repeated here. - Directory junctions: not tested by the author and not checked here. - A trailing separator in the component path (`WithTrailingSeparator` at `General.cpp:379`): I did not check how `GetFileAttributesW` treats a link with a trailing separator. - The description says `docs/dev/debt/libs.md` records the same MinGW problem. The entry at line 9 covers `remove` and `remove_all` on dangling links, not the `create_directory_symlink` failure. - Files read: `General.cpp` (diff and lines 280–330, callers), `GuestFilesystem.cpp` (diff and lines 196–210 and 330–345, plus symbol search), `docs/dev/debt/libc.md` (diff and lines 139–141). Excluded by rule: none. ## To get this to a good state Nothing is required.

Pull request closed

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!9371
No description provided.