Loader: match title DLL filenames ignoring ASCII case #1434
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1434
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1434"
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?
@fuzeofficlal on GitHub · 2026-11-24 17:58 UTC · original
fuzeofficlal:fix/loader-case-insensitive-title-dll-762→main· +135 −4 · 2 files · 1 commits · openFixes #762.
Summary
dirs.0case-insensitively (eq_ignore_ascii_case+path.is_file(), skipping colliding subdirectories) when the exact path is not a file so mixed-case title DLLs load properly on case-sensitive folders and broken images report their real on-disk filename in error context.Verification
directory_scan_matches_files_ignoring_ascii_case_and_skips_foldersandmaps_mixed_case_title_dlls_in_case_sensitive_folders(using per-directory NTFS case sensitivity with colliding uppercase directory names and malformed DLL error checks).cargo test -p victory-loader,cargo clippy --workspace --all-targets --all-features, andcargo xtask policy: passed.@acetonahard-code on GitHub · 2026-11-24 21:15 UTC · original
Tested on Windows 11 with the repo toolchain, merged into current
main(ffe310e):cargo test -p victory-loadermainmain+ this PRmain,--all-featuresmain+ this PR,--all-featurescargo clippy --all-targets -- -D warnings, with and without--all-features: clean.I didn't test with game data.
Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.
@Marvisak on GitHub · 2026-11-25 03:27 UTC · original · edited 2026-11-25 07:21 UTC
Automated triage for the maintainers.
Merge candidate (update after your reply).
map_dllincrates/victory-loader/src/windows.rsnow tries the import name as written first. If that misses, it falls back to a case-insensitive directory scan (find_dll_file→scan_dll_file→select_dll_entry) and keeps the lowercased name as theseen/loadedkey. Thanks for removing thefsutilcall. The new tests are a pure unit test onselect_dll_entry, atempfilescan test, and a load test that copiesversion.dllthe way existingload_probe.rstests do. None of them spawn a process or change filesystem attributes, so the maintainer-decision point no longer applies.Your reply points to a real defect in
main.map_dlllowercases the name beforedirs.0.join, so in a case-sensitive directory even an exact-case match is skipped silently. Folders created from WSL on NTFS are a real way to get such a directory. The Wine/Proton case is weaker, since Wine already does its own case-insensitive lookup.CI: passing (
check).Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-25 04:39 UTC · original
Rebased onto
940d32f(4339556a) and removed thefsutilprocess call and filesystem-attribute mutation, replacing it with an in-memory unit test onselect_dll_entry.On where this is reached in practice:
map_dllpreviously lowercasednamebefore joining the path (let name = name.to_ascii_lowercase(); let path = dirs.0.join(&name);), so in any case-sensitive directory even an exact-case match between the PE import descriptor and a mixed-case DLL filename on disk (FooBar.dll->dirs.0.join("foobar.dll").is_file()) silently returnedOk(())without loading the DLL, leaving its imports onmissingstubs. That hits Linux + Wine/Proton runs backed byext4/btrfs/xfsmounts without kernelcasefold(as reported in #762) as well as directories created from WSL on NTFS (which inheritFILE_CS_FLAG_CASE_SENSITIVE_DIR) or accessed over\\wsl.localhost\....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.