fix(relinker): normalize additional module directory paths #3509
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3509"
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 Lorkydey on 2026-10-11T12:04:07Z.
What
Normalize
--module-dirpaths before validating and recording them..., so valid names such as..pluginsare accepted while parent traversal is rejected.\outsideandC:pluginsare not absolute paths, but can reset or qualify the path when joined to the guest root. A root-relative path currently lets a module outside the game directory be converted into an artifact outsideapp0.Media/Plugins/andMedia/Pluginsmust both retain deferred initialization; previously the trailing separator prevented the directory from matching a module's parent, eagerly initializing it on Windows or adding it to the executable'sDT_NEEDEDon Linux.The checks use the C++ filesystem path queries and lexical normalization. Validation is lexical and does not resolve symbolic links. No Markdown files or dependencies are changed.
Tested
Windows x64, WinLibs MinGW-w64 GCC 15.2.0 (ucrt r7), CMake/Ninja, Release, BUILD_TESTING=ON, rebased onto current main
a11c8f7f:..pluginsand acceptance of an existing outside directory through a Windows root-relative path before the fix.cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON.cmake --build build-relinker --parallel 8: passed.ctest --test-dir build-relinker --output-on-failure --parallel 4 --no-tests=error: 108/108 passed.python tools/check_test_registration.py build-relinker: passed.python tools/check_conventions.py --base origin/mainandgit diff --check origin/main...HEAD: passed.Linux files were generated and inspected on Windows; no native Linux or macOS runtime testing was performed locally.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:29:06Z.
Checked the normalization in
GuestModuleBuilder.cpp(..pluginsaccepted, parent traversal / root names / root directories rejected, trailing separator stripped), relinker build + ctest (101/101), and thatguest_module_dirfails without the change. Merging.