HLE: a volume root in the \\?\ form is the host volume's root #4479
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!4479
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4478"
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?
@breachato on GitHub · 2026-11-30 20:54 UTC · original
breachato:hle-volume-root-verbatim→main· +81 −8 · 1 files · 1 commits · open[pr-fix]
What it changes
GetDriveType,GetDiskFreeSpaceandGetVolumeInformation(W and A) want a volume root, so for a virtual drivefiles.rscuts the host path down to the host volume's root (G:\→C:\,host_volume_root). That only matched a host path that starts with its drive letter.translateitself gives the\\?\form in two cases: when the title writes\\?\X:\..(supported, per the module docs), and for every path on a drive whose host folder is 248 characters or longer (LONG). In both cases the root reached the host as a folder:GetVolumeInformationW/Afailed (returned 0) for all of them;GetDriveTypeW/AreturnedDRIVE_NO_ROOT_DIR(1) for a long drive's plainX:\.This adds
volume_root, generic overu8/u16: it strips the\\?\prefix before takingC:\, and turns\\?\UNC\server\share\..into\\server\share\(the formverbatimbuilds for a drive on a share).host_volume_rootandGetVolumeInformationA(which had its own copy of the drive-letter case) both use it.How it was tested
main), per callGetDriveTypeW|GetDriveTypeA|GetDiskFreeSpaceW|GetDiskFreeSpaceA|GetVolumeInformationW|GetVolumeInformationA:\\?\X:\:3|3|1|1|0|0X:\:1|1|1|1|0|0\\?\X:\:3|3|1|1|0|03|3|1|1|1|1in all three.a_volume_root_is_found_in_every_host_form(drive letter,/,\\?\C:\,\\?\UNC\server\share, narrow bytes, and the forms that are not roots) anda_verbatim_or_long_virtual_root_is_the_host_volume_root(the six calls above end to end; fails onmain).cargo test -p victory-hle --lib --locked: 471 passed.modules::xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_itfailed once in the full parallel run and passes alone; it is the known parallel-run flake (#2420, #2439).cargo clippy -p victory-hle --no-deps --all-targets: nothing infiles.rs(the one warning left, inxmem.rs:1933, is onmaintoo).cargo testpassed for the crates it touches: yesHow to try it
cargo test -p victory-hle --lib --locked modules::files. To see the bug onmain, keep only the new end-to-end test: it stops at the first\\?\X:\root.Checked for overlap
files.rs(translate, a host path on the drive's own letter), a different function.Assisted by Claude.
37ac74c8f8to5e16277e2fView 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.