hle: translate \??\ object-manager paths onto virtual drives #2089
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!2089
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2089"
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?
@Pradhyumna51 on GitHub · 2026-11-25 04:34 UTC · original
Pradhyumna51:fix/hle-object-prefix-virtual-drives→main· +89 −11 · 2 files · 2 commits · openCommit
11ca3cetaughtmedia::localto accept the\??\object-manager prefix so shares under\??\UNC\...stay blocked, while returning\??\X:...paths directly beforefiles::translatecould rewrite them. Meanwhile,files::translateandfiles::narrowonly checked for\\?\, leaving\??\X:\...paths unmapped in both the file APIs and Media Foundation path resolution.files::translateandfiles::narrownow recognize\??\alongside\\?\, stripping a verbatim\\?\prefix from the mounted host root or rewriting a\\server\shareroot toUNC\server\sharewhen\??\is used.media::localnow passes local\??\X:...paths throughfiles::translate.Verified locally with
cargo +stable-x86_64-pc-windows-gnu test -p victory-hle --locked --lib -- --test-threads=1(144 passed, 0 failed) andcargo +stable-x86_64-pc-windows-gnu xtask policy(182 files ok).@Dathinel on GitHub · 2026-11-25 04:42 UTC · original
I ran CreateFileA and CreateFileW through the synthetic conformance title from #2057 (
637ba6f), before and after applying the runtime diff from84ed850. Each check opened the same mounted ASCII file withGENERIC_READandOPEN_EXISTINGand compared the bytes read against the fixture.G:\conformance.txt\\?\G:\conformance.txt\??\G:\conformance.txtINVALID_HANDLE_VALUE, last error 3The other 152 checks gave identical results in both runs (147 passed, 5 failed). This exercises guest file reads on a local virtual drive. Media paths and native Windows behavior were outside this test.
AI-assisted testing and review.
@jeremygold02 on GitHub · 2026-11-25 04:46 UTC · original
Triage verdict — Keep the virtual-drive fix, preserve original wide paths (
84ed850)Evidence
11ca3ce. The old Media Foundation branch handed the original UTF-16 units through unchanged. This version classifies a lossy string and reconstructs the host path from it, so an unmapped native path can lose original code units. Media classification and fallbackChecks and limits
Next step
This verification was AI-assisted.
@Pradhyumna51 on GitHub · 2026-11-25 04:50 UTC · original
Updated
media::localin6df6d10to passCow::Borrowed(url)directly for drive,\\?\, and\??\paths rather than re-encoding wide units from the lossy classification string, while keepingfile:URL percent-decoding owned. Both virtual-drive translation and unmapped fallbacks now preserve arbitrary UTF-16 code units unchanged.Added unit assertions in
only_local_files_reach_the_hostfor an unpaired surrogate on both an unmapped\??\C:\path and a mounted\??\drive, and verified withcargo +stable-x86_64-pc-windows-gnu test -p victory-hle --locked --lib -- --test-threads=1(144 passed, 0 failed) andcargo +stable-x86_64-pc-windows-gnu xtask policy(182 files ok).@Marvisak on GitHub · 2026-11-25 10:34 UTC · original
Automated triage for the maintainers.
files::translateandfiles::narrow(modules/files.rs) now accept the\??\prefix as well as\\?\, so\??\X:\...reaches a virtual drive. A\\?\or\\server\shareroot is rewritten correctly under a prefix, which also fixes the\\?\prefix with a verbatim root.media::local(modules/media.rs) sends local\??\X:paths throughtranslateand passes the original UTF-16 units through instead of a lossy re-encoding. I checked that the share and UNC rejections inlocalare unchanged. Unmapped\??\C:paths reach the host exactly as before, so the media guards are not loosened. Tests cover the mapping, a verbatim-root mount and unpaired surrogates. A contributor's conformance run shows\??\G:opens failing before and passing after. CI: passing.Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-26 01:41 UTC · original
Code review and Windows 11 verification at head
6df6d100d1e3merged ontomain(63bcca43c6a0):The
\??\prefix support andCow::Borrowed(url)surrogate preservation inmedia.rslook useful (xtask policy191 ok,clippy0 warnings,victory-hle155/155 passed), though three path edge cases and a merge conflict with#1772are worth addressing:./..skipped for\??\and\\?\paths (crates/victory-hle/src/modules/files.rs:167):verbatim()is only invoked whenprefix.is_empty() && root.len() + tail.len() >= LONG, so any\??\(or\\?\) path skipsverbatim()entirely. While/is converted to\,.and..in\??\X:\a\..\bremain unnormalized (and Windows object-manager / verbatim paths do not normalize..).files.rs:186):root(as#1772does), a mount atC:\with input\??\X:produces\??\C:\\.media.rs:66trim_start_matches("UNC\\")is case-sensitive, andGetDiskFreeSpaceW(files.rs:431) does not yet extract a volume root for\??\paths.#1772: Both PRs modifytranslate()infiles.rs(git mergeconflicts). Rebasing onto#1772would resolve the conflict and inheritverbatim()normalization andvolume_rootcleanly.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.