fix(kernel): open game files through the extended-length path on Windows when the path is MAX_PATH or longer #9947
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9947"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-22T23:10:27Z.
What
On Windows,
CreateFileWand the streams built on it refuse an ordinary path of 260 characters (MAX_PATH) or more. #12560 added the sharedNativeVerbatimPath_nid_no_patchand already uses it inopenand the directory open. This PR builds on that helper for the places that still used the plain path:FindFirstFileExWlisting of the parent and theis_regular_filefallback) and the end-of-file checkLoadlists a directory throughFindFirstFileExWwith a verbatim search pattern on Windows and stats the directory, its parent and each entry through the verbatim path.InsideApp0opens the/app0root that way, andOpenDirectoryDescriptorchecks for a directory that way.sceKernelOpen: theO_NOFOLLOWsymlink check and the directory fallback after a failed openSamurai Maiden (PPSA04132, 01.060.000) has asset bundles with long names under
Media/StreamingAssets/aa/PS5/. Under a 116-character runtime folder, every open whose resolved path reached 260 characters failed, and the title stayed dimmed on its logo screen.Tested
Windows 11 (10.0.26200), WinLibs GCC 15.2.0, this head on main
4f41f4c375:guest_apr_read_*cases including the newguest_apr_read_longeof;guest_filesystem;guest_windows_directory_link_types(withLongNoFollow);guest_directory_entries,_buffer,_rewindand_close;agc_shader_disk_cache_long_pathslong_pathsfailed while removing its temporary folder (WinError 32, file in use). Antivirus on this machine was blockingctest.exeat the time, so I couldn't rerun it,guest_directory,guest_filesystem_errororagc_pipeline_journal_long_paths.Open.cpp,Apr.cppandDirectoryDescriptor.cppcompile on Linux (g++ -fsyntax-only). No full Linux build.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T00:15:12Z.
Review: CHANGES_REQUESTED
The exact-head implementation still returns short relative paths before resolving them. A short relative input can resolve past
MAX_PATHunder a long current directory, while the added test only uses a relative string already longer than the limit. Please resolve/check the relative path before this early return and add the short-relative-under-long-current-directory regression case. Exact-head diff-check and conventions pass; hosted eligibility, conventions, labels and report pass, while product/relinker jobs are skipped. I have not run the Windows-only CTest locally.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T00:17:46Z.
Review: APPROVED
Reviewed exact head
b1ab76973a82cfe88193fae36a62f23e4e4289f4. The third commit resolves relative paths before checking the normalized absolute length, preserves the fast path for short absolute paths, and adds the requested short-relative-name under long-current-directory case with cleanup. The reported Windows 11 run passes the updated helper test and repeats the title reproduction. I independently compiled and linked the exact Windows test and helper with MinGW-w64 GCC 12.2 (-std=c++20 -Wall -Wextra -Werror); this host has no Windows runtime, so I did not execute the binary. Exact-head diff-check and conventions pass. Product/relinker CI remains skipped by repository path policy.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T00:18:01Z.
Review: DISMISSED
One issue remains in the new regression test: it creates and recursively removes a fixed directory under the system temp path (
aps5_extended_path_test). That can delete a pre-existing directory belonging to the user or interfere with a concurrent test run. Please use an exclusively created unique temp directory and clean up only that directory. The short-relative-path fix itself is present; exact-head diff-check/conventions pass, and the Windows test/helper cross-compile and link cleanly (runtime assertions were not run here).Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T03:17:44Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The long-path handling for the main open, directory and APR read paths looks right, but two checks in functions the debt entry now lists as long-path capable (
sceKernelOpenwithO_NOFOLLOW/O_CREAT|O_EXCL, and the APR read at end of file) still use the plain path, so a long path takes a different result there than a short one.What I ran
Head
fa00e458e659d19fd825e61d7e9ee5095d738235,main3a2b91981651569163768854a1fcdc7193b6667b, merged with--no-ffin a clean worktree (Linux, GCC 16.2.1, Release, Ninja).Results
maingit diff --checkcheck_conventions.pyAll conventions checks passed.libs+ full build)guest_filesystem,guest_apr_read_*(6),guest_directory,guest_directory_link_types,guest_directory_entrieson Linuxwindows_extended_path,guest_windows_directory_link_typesctest (merged tree)
Negative control
I restored
Apr.cpp,DirectoryDescriptor.cpp,Open.cppand the libkernelCMakeLists.txtfrommainand kept the newGuestFilesystem.cpp. On Linuxguest_filesystemstill passes, which is expected:WindowsExtendedPathreturns its input unchanged off Windows, and Linux has no 260-character limit. So the Linux run does not exercise the change. The Windows negative controls reported in the thread (guest_filesystemfailing at the newsceKernelOpencheck, andguest_windows_directory_link_typesfailing with eitherfa00e458e6fix reverted) are from other people's runs. I did not reproduce them.Findings
Blocking
sceKernelOpenlink checks still use the plain path —core/libs/prx/libkernel/File/src/Open.cpp:231,:238,:240,:243(head line numbers).NativeOpenand the directory fallback now go throughWindowsExtendedPath, but theO_CREAT|O_EXCLreparse-point check (GetFileAttributesW(native.c_str())) and theO_NOFOLLOWcheck (is_symlink(native),GetFileAttributesW(native.c_str()),ReadJunction(native, ...)) do not. In a process without long-path opt-in,GetFileAttributesWon a path of 260 characters or more returnsINVALID_FILE_ATTRIBUTES, so both checks are skipped silently. With this PR the open that follows then succeeds:O_NOFOLLOWon a junction or symbolic link at a long path opens through the link. The same call on a short path returnsEMLINK.O_CREAT|O_EXCLon a long path, theEEXISTcheck for a reparse point is skipped, and the outcome is left toCreateFileW(CREATE_NEW).Before this PR, the open failed with
ENOENT. Now it returns a wrong success, and the debt entry sayssceKernelOpenuses the\\?\form. Suggested fix: computeconst auto openPath = File::WindowsExtendedPath(native);once inOpenNativeand use it for these four calls, with aguest_windows_directory_link_typescase that opens a junction under a long directory withO_NOFOLLOWand expectsEMLINK. This is a source-level finding. I could not run it on Windows.APR read at end of file still stats the plain path —
core/libs/prx/libkernel/Apr/src/Apr.cpp:186._readFilenow opensWindowsExtendedPath(file.path)(line 164). But a short read at EOF evaluatesstd::filesystem::file_size(file.path)on the plain path. For a file at a path of 260 characters or more, that call fails andfile_sizethrowsfilesystem_error. The read then aborts where a short path zero-fills the tail, which is the caseguest_apr_read_eofcovers. The debt entry lists "the APR file read" as handled. Suggested fix: use the extended path there too, for example by hoistingconst auto hostPath = File::WindowsExtendedPath(file.path);and using it for both the stream andfile_size. This is also source-level and not run on Windows.Non-blocking
_fileSize'sFindFirstFileExW((path.parent_path() / L"*").c_str(), ...)(Apr.cpp:78), itsis_regular_file(path)fallback (Apr.cpp:105), andsceKernelAprGetFileStat'sFillFileStat(_file(id).path, ...)(Apr.cpp:890, which throws on failure). So when the parent directory is 258 characters or more, resolution fails withENOENT, and a stat of a long-path APR file throws. The debt line's catch-all ("the other functions that take a native path") covers this. Naming APR resolve and stat explicitly, or routing them through the helper, would make the entry accurate.Load:DirectoryDescriptor.cpp:226-230. The original loop moved into the new#elsebranch, but it still contains an inner#ifdef _WIN32 ... EntryType(it->path(), followLinks) ... #elsethat can no longer be compiled. The two adjacent#ifdef _WIN32blocks at lines 206-210 and 211 could also be merged. Suggested fix: keep only theDirectoryEntryType(it->symlink_status(error))line in the non-Windows loop.WindowsExtendedPath.hpp:21normalizes\server\share\...as a rooted path. A..directly under the share therefore removes the share:\\server\share\..\xbecomes\\server\x, while Win32 keeps\\server\shareas the root and gives\\server\share\x. This is a rare input. Normalizing only the part after\\server\sharewould match Win32.The reviews and comments in the thread already covered short relative paths, the fixed temporary directory, directory
EACCES,directory_iteratoron WinLibs,InsideApp0and theMAX_PATHsearch pattern. The current head addresses all of them in source, and I am not repeating them.Not verified
windows_extended_path,guest_windows_directory_link_typesand the Windows branches ofguest_filesystemwere not compiled or executed here. Both blocking findings come from reading the source.LongPathsEnabledtogether with alongPathAwaremanifest).To get this to a good state
O_CREAT|O_EXCLandO_NOFOLLOWchecks inOpenNative, and add a Windows test forO_NOFOLLOWon a junction under a long directory.file_sizecall in_readFile. A Windows APR test that reads past EOF of a long-path file would cover it.#ifdefinLoad.Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T23:27:03Z.
Review: APPROVED
XairRrR's two points look addressed in 67c3f5e7b9, and here's the Windows run the Linux reviews can't give. The
O_NOFOLLOWandO_CREAT|O_EXCLlink checks inOpen.cpp(is_symlink,GetFileAttributesW,ReadJunction) now use the extendedopenPath. The APR end-of-file size check inApr.cppuses the extendedhostPath, with the newlongeofcase. The UNC branch ofWindowsExtendedPathkeeps the\server\shareroot and gives\?\UNC\server\share\...for a long path.Tested on Windows 11, WinLibs GCC 15.2.0, with this head merged onto current
main: 15 of 15 pass, nothing skipped. They areguest_filesystem,guest_directory,guest_directory_entries, the nineguest_apr_read_*cases includingguest_apr_read_longeof,long_paths,agc_pipeline_journal_long_pathsandagc_shader_disk_cache_long_paths. Withmain'sApr.cpp,DirectoryDescriptor.cpp,Open.cppand libkernelCMakeLists.txt(XairRrR's negative-control set),guest_filesystemaborts (0xc0000409).Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:37:57Z.
Review: APPROVED
Re-checked — approved
Both blocking findings from my last review are fixed. Commit
67c3f5e7b9puts thesceKernelOpenlink checks and the APR end-of-filefile_sizecall on the extended path and addsLongNoFollowandguest_apr_read_longeof. Commita5be6b2720moves the helper include out of the#ifdef _WIN32block, so the Linux build works again. The two failures the bot reported come frommain, not from this PR.What changed since my last review
I last reviewed
fa00e458e6. Since then:67c3f5e7b9:OpenNativenow computesopenPathonce and uses it for theO_DIRECTORYstatus check, theO_CREAT|O_EXCLreparse-point check and theO_NOFOLLOWchecks._readFileuses onehostPathfor the stream and forfile_size._fileSizeextends the parent directory before listing it and extends the path in itsis_regular_filefallback. The unreachable#ifdefinLoadis gone. UNC normalization now keeps\\server\shareas the root.LongNoFollowinGuestWindowsDirectoryLinkTypes.cpp,guest_apr_read_longeof, and a\\server\share\..\file.bincase inwindows_extended_path.a5be6b2720: theWindowsExtendedPath.hppinclude inOpen.cppsits above the#ifdef _WIN32block. This fixes the Linux build error reported by oneandonlydean.main. The range-diff shows only context changes in the earlier commits.main's production filesguest_filesystemaborts.What I ran
Head
a5be6b2720c0af77b3324523f07af18b8c870793,main5cb015caaaaf83f8ee431414ee6a457b5b307d49, merged tree766baa0fe992b51a75c8c6b93fc766ee0297cf94(Linux, GCC 14.2.0, Release, Ninja).git diff --checkcheck_conventions.pyAll conventions checks passed.libsOKguest_filesystem, the 7 Linuxguest_apr_read_*casesagc_driver_image_sample_lod_clamp_shader_lanemain(see below)unwrap_self_..._destination_directory_groupos.chown→EINVALin the sandbox); comes frommain(see below)windows_extended_path,guest_windows_directory_link_types,guest_apr_read_longeofThe two new failures come from
main:096c45570f, which is older thanmain. Since thenmainmerged4e2a028e43 fix(agc): bind a T# minimum LOD through an S# that holds the LOD at 0(#12980) and new unwrap test cases (#14558). Those are the two failing tests.WindowsExtendedPathreturns its input unchanged when_WIN32is not defined. Every other changed line inApr.cpp,Open.cppandDirectoryDescriptor.cppis inside_WIN32code or goes through that helper.tools/, which this PR does not touch.main's production files, but could not (see Not verified).AGC failure (same as build.json)
Previous findings
sceKernelOpenlink checks on the plain path: Resolved.core/libs/prx/libkernel/File/src/Open.cpp:235-255usesopenPathforstatus, bothGetFileAttributesWcalls,is_symlinkandReadJunction. TheLongNoFollowcase expects0x8002001Ffor a junction pastMAX_PATH. I checked this in source. The Windows run and negative control are BunnyFl's and the author's reports.file_sizeon the plain path: Resolved.core/libs/prx/libkernel/Apr/src/Apr.cpp:165-188useshostPathfor both the stream andfile_size.guest_apr_read_longeofreads 200 bytes from a 100-byte long-path file and checks the zero fill and the guard bytes. Its Windows result is author-reported.Apr.cpp:79andApr.cpp:106extend the path.FillFileStatgoes throughNativeMetadataPath→WindowsNormalizedPath(Open.cpp:120-121), and the debt entry names the size lookup and the end-of-file check.#ifdefinLoad: Resolved. The non-Windows loop now has only theDirectoryEntryTypeline...under the share: Resolved.WindowsExtendedPath.hpp:20-28normalizes only the part after\\server\share, andwindows_extended_pathhas the\\server\share\..\file.bincase.New findings
Blocking
None.
Non-blocking
MAX_PATHboundary (core/libs/prx/libkernel/Apr/src/Apr.cpp:79).path.parent_path()first and appends\*afterwards. This is the boundary case mashingaan found inListDirectoryEntries, which the PR already fixed there.WindowsExtendedPathleaves the parent unchanged and the search pattern reaches 260.FindFirstFileExWthen fails, and an empty size map is cached for that directory.is_regular_file+FillFileStaton the extended path. But every file in such a directory pays a separate stat.File::WindowsExtendedPath(path.parent_path() / L"*"), asDirectoryDescriptor.cpp:145does.Not verified
main's production files, but the sandbox stopped the build: CMake's regeneration fails withOperation not permittedin SDL2'sconfigure_file. That attribution rests on themainhistory and on the Linux no-op argument above. The worktree is back at the merged tree (git status --porcelainis empty), but the build tree'sbuild.ninjais now marked for regeneration.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T14:28:56Z.
Review: APPROVED
Re-checked — approved
The branch was rewritten as one commit,
61546e6932, on top ofmain4f41f4c375. It removesWindowsExtendedPath.hppand its test and calls #12560'sNativeVerbatimPath_nid_no_patchinstead. It keeps the APR, directory-listing,/app0-root andO_NOFOLLOWfixes and their tests. The diff check, the conventions check and the affected Linux tests pass, and I found nothing blocking.What changed since my last review
I last reviewed
a5be6b2720. Since then:File::WindowsExtendedPath/WindowsNormalizedPathand thewindows_extended_pathtest are gone. The debt entry the earlier head added is gone too.mainhas no long-path entry indocs/dev/debt/libkernel.md, so nothing is left stale.Apr.cpp: a new_hostPath(verbatim path, or the plain path if the helper returns an error) is used for the parent listing, theis_regular_filefallback, the stream and the end-of-filefile_size.DirectoryDescriptor.cpp:HostPathdoes the same job.InsideApp0opens the root through it.ListDirectoryEntries(FindFirstFileExW) builds the verbatim pattern from the completedirectory / L"*".Loadstats the directory, its parent and each entry through verbatim paths.OpenDirectoryDescriptorchecksis_directoryon the verbatim path.Open.cpp: theO_NOFOLLOWis_symlinkcheck usesopenNativeon Windows. The directory fallback after a failed open goes throughNativeMetadataPath.guest_apr_read_longeof, theLongApp0Root,LongNoFollowandSearchPatternAtMaxPathcases inGuestWindowsDirectoryLinkTypes.cpp, and the long-path open andgetdentschecks inGuestFilesystem.cpp. All of them are Windows-only.long_paths,guest_directory,guest_filesystem_errorandagc_pipeline_journal_long_pathswere not conclusive or not run. The author says antivirus blocked them.What I ran
Head
61546e69320d5ecca1851f3c5a9f4298c590e4d1,main4f41f4c375f5abb487dbd184fbc150f31994d762, merged treea25d61afe035f9a511cfb1512ab077e7b3bc37ad(Linux, GCC 14.2.0, Release, Ninja).git diff --checkcheck_conventions.pyAll conventions checks passed.libsOKmain(baseline ismain_sha)guest_filesystem, 7 Linuxguest_apr_read_*,guest_directory,guest_directory_entries,guest_directory_link_typesguest_apr_read_longeof,guest_windows_directory_link_types, the long-path part ofguest_filesystem)Negative control
None on this machine. All new and changed test code is inside
#ifdef _WIN32(TestLongHostPathStatsits in the_WIN32block ofGuestFilesystem.cpp,longeofis only registered onWIN32, andGuestWindowsDirectoryLinkTypes.cppis Windows-only). On Linux the production change does nothing at run time:NativeVerbatimPath_nid_no_patchreturns its input when_WIN32is not defined (core/libs/prx/libc/include/WindowsVerbatimPath.hpp:257-262), and the rest of the changed code is in_WIN32branches. So no Linux run can fail withmain's production files. The Windows negative controls come from earlier heads: the author's and BunnyFl's runs, against code that was functionally the same. Nobody has repeated them on this head.Previous findings
MAX_PATHboundary: Resolved.core/libs/prx/libkernel/Apr/src/Apr.cpp:86still extends the parent before it appends\*. But the shared helper switches to the verbatim form from 248 characters (WindowsMaxDirectoryPathLength,WindowsVerbatimPath.hpp:12,252). So a parent left unprefixed is at most 247 characters, and its\*pattern stays at or below 249, under 260. The boundary case can no longer happen.The two blocking findings from my earlier review (the link checks in
sceKernelOpen, and the APR end-of-filefile_size) were resolved ata5be6b2720. The rewrite keeps both fixes:Open.cpp:243-257usesopenNativefor theGetFileAttributesW,is_symlinkandReadJunctionchecks.Apr.cpp:172uses onehostPathfor the stream and forfile_size.New findings
Blocking
None.
Non-blocking
_hostPath(core/libs/prx/libkernel/Apr/src/Apr.cpp:70-74) andHostPath(core/libs/prx/libkernel/File/src/DirectoryDescriptor.cpp:42-50) both do "verbatim path, or the input on error".Open.cpp:235-237andOpenPlaceholder(DirectoryDescriptor.cpp:271-273) write the same thing inline. This could become one helper next toNativeVerbatimPath_nid_no_patch, in this PR or a follow-up. The#ifdefinHostPathis also unneeded, because the helper already has a non-Windows overload.LongApp0Root,LongNoFollowandSearchPatternAtMaxPath(core/libs/tests/GuestWindowsDirectoryLinkTypes.cpp) andTestLongEofremove their directories only on the success path.LongApp0Rootalso leaves the/app0alias in place ifTypesthrows. Each run uses a freshsteady_clockname, so a failed run only leaves directories behind in the build tree. A small RAII guard, like the one the earlierwindows_extended_pathtest had, would clean them up.Unblocks: PPSA04132has no Game bring-up discussion number. CONTRIBUTING asks for the formUnblocks: PPSA01325 #3232. Please add the discussion, if one exists.Not verified
Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-03T14:44:57Z.
Review: APPROVED
Re-approving at
61546e6932, the one-commit rewrite ontomain4f41f4c375. My earlier approval was fora5be6b2720. This head is a new implementation, and I read the whole diff again rather than a delta.What I read
_hostPath/HostPathhelpers inApr.cppandDirectoryDescriptor.cppcallNativeVerbatimPath_nid_no_patch(core/libs/prx/libc/include/WindowsVerbatimPath.hpp:241) and keeps the plain path when it returns an error. The helper returns\\?\and\\.\paths unchanged (core/libs/prx/libc/include/WindowsVerbatimPath.hpp:247), soListDirectoryEntriescan pass an already verbatim directory back throughHostPathwithout doubling the prefix. Outside Windows it returns the path as given (core/libs/prx/libc/include/WindowsVerbatimPath.hpp:257-262), so the unguarded_hostPathinApr.cppis a no-op on Linux and macOS.Loadpasses toFillLinkStat/TryFillFileStatare safe:NativeStatPathinNativeStat.cppleaves\\?\paths as they are.InsideApp0only changes how the/app0root is opened. The component comparison against the guest directory is unchanged.Open.cpp, the WindowsO_NOFOLLOWcheck now testsopenNative, the path the open itself uses. The directory fallback stats throughNativeMetadataPath, falling back to the plain path on error, like the metadata paths above it. Non-Windows code is unchanged.Loadthrows on anyFindFirstFileExW/FindNextFileWerror exceptERROR_FILE_NOT_FOUNDandERROR_NO_MORE_FILES, like thedirectory_iteratorloop it replaces.What I ran (Windows 11, WinLibs GCC 15.2.0, Release, this head merged onto
4f41f4c375): 16 tests (guest_apr_read_*includinglongeof,guest_filesystem,guest_directory,guest_directory_entries,guest_windows_directory_link_types,long_paths,agc_pipeline_journal_long_paths,agc_shader_disk_cache_long_paths): 16/16 pass.Negative control: the same tests with
Apr.cpp,DirectoryDescriptor.cppandOpen.cpptaken frommain: 3 of 16 fail, all in the new cases.guest_apr_read_longeofguest_filesystem: "Filesystem check failed at line 392 (guest errno 13, Win32 error 3)", the long/long-stat-host/directory open.guest_windows_directory_link_types: line 120, the directory open inTypes().One limit of this run: the link-type test printed "Symbolic-link cases require Windows developer mode or symbolic-link privilege; junction cases still run". Its symbolic-link cases did not run here; the junction cases did.
Imported from boykopovar/AnyPS5. Originally posted by Superseabas on 2026-11-07T16:40:16Z.
Review: APPROVED
Windows check of the rebased head
2a234fd995, merged ontomain090f57166a(clean merge). The two approvals are on61546e6932, so this covers the rebase, including theDirectoryDescriptor.cppresolution against #12139, and the tests the description couldn't run.Setup: Windows 11 Home 10.0.26200, Ryzen 7 7700X, WinLibs GCC 16.2.0 (
x86_64-ucrt-posix-seh, r3), Release,BUILD_TESTING=ON. Run from PowerShell. This machine hasLongPathsEnabled = 1, which matters for one test (below).Non-GPU suite (
ctest -E '^agc|gpu|vulkan|video_out' -j 8):mainselect_tests_MissingCommandTests(symlink privilege) andconfigure_seed_stdout(cmakewithout-Gpicks NMake) fail onmaintoo.loadexec_arguments, is Windows Defender. It quarantined the test's relinked executables in%TEMP%\anyps5-loadexec-*(WinError 225 … contains a virus or potentially unwanted software). After that,mainfailed it 5 of 5 with the same error, so it isn't this change.File-path tests, 28 of them (
-R 'apr_read|guest_.*filesystem|guest_directory|long_path|link_types|working_directory'), 5 runs: 28 / 28 each time. That includes the ones the description lists as not run or not conclusive:long_paths,guest_directory,guest_filesystem_errorandagc_pipeline_journal_long_paths, as well asguest_apr_read_longeof,guest_windows_directory_link_typesandagc_shader_disk_cache_long_paths.guest_directory_removed_entries(#12139's test) passes in all 5 runs, so the rebase kept its rule. The new Windows listing still skips an entry whoseFillLinkStatgivesENOENT.Red check, with
main'sApr.cpp,DirectoryDescriptor.cppandOpen.cppand the PR's tests kept, 3 runs:guest_filesystemfails at the long-directorysceKernelGetdentslisting (Require(longNames == {".", "..", "payload.bin"})), 3 of 3.guest_windows_directory_link_typesfails atRequire(app0.at("packed") == 4), the junction under a long/app0root, 3 of 3.guest_apr_read_longeofpasses withmain'sApr.cpp. The test executables embed<longPathAware>true</longPathAware>, and withLongPathsEnabled = 1Windows accepts the plain long path, so on this machine the old APR reader succeeds and the test can't fail. On a default install (LongPathsEnabled = 0) it should fail as described. I didn't change the setting, so the APR part of the fix is unchecked here.tools/check_conventions.py --base mainpasses.Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T02:03:36Z.
Review: COMMENTED
Windows check of head
2a234fd995, merged ontomain676fb61acc(clean merge). It covers the APR part that the last review couldn't check.Setup: Windows 11, WinLibs GCC 15.2 (
x86_64-ucrt-posix-seh), Release, full build withBUILD_TESTING=ON.LongPathsEnabled = 1, but this toolchain doesn't embedlongPathAwarein the test executables (guest_apr_read_tests.exeandguest_windows_directory_link_types_tests.exedon't contain the string), so a plain long path fails here as it would on a default install.File-path tests (
-R 'guest_apr_read_|^guest_filesystem|guest_windows_directory_link_types|^guest_directory', 19 tests): 18 / 19.guest_filesystemgets through the new long-directory read and listing inTestLongHostPathStatand then aborts later, in a check this PR doesn't touch (below).Red check, with
main'sApr.cpp,DirectoryDescriptor.cppandOpen.cppand the PR's tests kept: 16 / 19.guest_apr_read_longeoffails:cannot resolve the long path APR file. So theApr.cppchange is what makes the long-path APR read work without the manifest.guest_windows_directory_link_typesfails opening/app0under the long root (0x8002000D).guest_filesystemfails at line 411, opening the long directory forsceKernelGetdents(guest errno 13, Win32 error 3).Unrelated failure:
guest_filesystemaborts in the third-party reparse tag check (tagged.bin, tag0xABC) withstd::system_error:lstat: CreateFileW: The file cannot be accessed by the system.main's sources and tests do the same, 2 of 2 runs. This user can set the reparse point, so the check runs instead of being skipped, andlstatthrows instead of returning an error. That is amainissue, not this change.