HLE: reject failed GetLogicalDrives() mask when mounting virtual drives #2437
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2437
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2437"
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-29 13:01 UTC · original
fuzeofficlal:fix/hle-files-logical-drives-zero→main· +55 −3 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCSummary
Win32
GetLogicalDrives()returns0on failure.files::mount(crates/victory-hle/src/modules/files.rs) previously did not check for0, so(0 >> bit) & 1 == 0treated every drive letterD..=Zas free and allocatedZ:, risking shadowing a real host drive.Fix
mount_insomountlogs a warning and returnsNonewithout modifying the mount table whenGetLogicalDrives()returns0, while still returning cached letters for already-mounted roots.modules::files::testscovering0, full bitmasks (0x03ff_ffff/0x03ff_fff8), and normal letter allocation/reuse without mutating globalDRIVES.Verification
VIctory-NVIDIA:cargo test --locked -p victory-hle -- --test-threads=1cargo clippy --locked -p victory-hle --all-targets(no new warnings)cargo run --quiet --locked -p xtask -- policy --staged@Dukestar69 on GitHub · 2026-11-29 13:03 UTC · original · approved these changes
Tested locally merged onto
main(829188e9).crates/victory-hle/src/modules/files.rs.cargo test -p victory-hle --lib filespassed (18 passed; 0 failed, includingmount_in_rejects_failed_host_drive_query,mount_in_chooses_highest_free_letter_and_reuses_mounts, andmount_in_uses_only_d_through_z) with 0 warnings invictory-hle.Clean guard against failed
GetLogicalDrives()masks when mounting virtual drives. LGTM.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).