Loader: find a title DLL whatever its name's case, even beside a folder spelled like it #162
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/162"
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 fxceless/victory-fork. Originally posted by Peppacodes on 2026-11-24T22:03:28Z.
On a case-sensitive folder, a title DLL whose file name's case differs from the name it is loaded by is silently skipped. Its imports then go to stubs, and the title's own
LoadLibrarysees "not a title image".Case-sensitive folders are common:
1. Find a title DLL whatever its name's case.
map_dlllowercased the DLL's name and joined that to the title folder. On a case-sensitive folder,GameLib.dllis notgamelib.dll.is_file()was false and the DLL was skipped without an error.2. A folder spelled like a title DLL does not hide it. The case-ignoring fallback took the folder's first entry that matched the name, and only then checked it was a file. A folder listed before the file made the DLL not found (NTFS lists
LATE.DLLbeforelate.dll). It now takes the first matching entry that is a file. MichaelSmithAI found this in Wine on ext4; the same happens on a case-sensitive NTFS folder.Tested on this branch's base (
2119b0e) plus these two commits, on Windows 11:fsutil setCaseSensitiveInfo, no admin needed) holdingLate.dll. They load it asLate.dll,LATE.DLLandlate.dll, also with a folder named like the DLL listed before it. They're skipped where Windows cannot make such a folder.cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: clean.cargo test -p victory-shader -p victory-hle -p victory-loader --locked: 337 passed, 0 failed, 2 ignored. This was with the two other PRs from this account applied as well.AI-assisted (Claude Code).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.