HLE media: translate \??\<drive> virtual-drive URLs (fixes #2410) #2416
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!2416
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2416/head"
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?
@pushkarreddyy on GitHub · 2026-11-25 13:08 UTC · original
pushkarreddyy:fix/media-object-prefix-virtual-drive→main· +16 −2 · 1 files · 1 commits · closed without mergingFixes #2410.
Root Cause
In
crates/victory-hle/src/modules/media.rs,local()translates\\?\<drive>paths throughfiles::translateso virtual-drive mounts (such asG:or persistent storage drives) resolve to their host folders. However, the\??\<drive>object-manager branch returnedOk(with_nul(url))directly without callingfiles::translate, causing virtual-drive URLs with the\??\prefix to reach the host Media Foundation resolver untranslated.Implementation Details
\??\branch incrates/victory-hle/src/modules/media.rs(local) to construct\\?\{rest}and pass it throughfiles::translate, falling back towith_nul(url)when the drive letter is not a mounted virtual drive.Verification
object_prefix_translates_virtual_drivesunit test incrates/victory-hle/src/modules/media.rs, mounting a temporary directory and verifying\??\<letter>:\movies\intro.mp4translates to\\?\...\movies\intro.mp4.localandthe_host_reads_those_spellings_as_sharestests pass; CIcheckis green.Scope & Limitations
\??\<drive>paths (e.g.,\??\C:\Windows\a.wav) remain unchanged;\??\UNC\...remains refused.@pushkarreddyy on GitHub · 2026-11-25 13:36 UTC · original
Hi @Marvisak — this PR resolves #2410 (translating
\??\<drive>virtual-drive media URLs viafiles::translate), with regression tests and CI (check) passing. Ready for review and merge whenever convenient!@pushkarreddyy on GitHub · 2026-11-25 14:19 UTC · original
Testers on untested Windows 10/11 and Wine/Proton setups are welcome to verify
\??\<drive>virtual-drive media playback with this PR.AI-assisted: yes (Gemini 4 Neon)
@Marvisak on GitHub · 2026-11-25 15:28 UTC · original
Automated triage for the maintainers.
Merge candidate (worth a look). In
media.rslocal, the\??\<drive>branch now goes throughfiles::translatethe same way the\\?\<drive>branch already did, so a URL on a mounted virtual drive reaches its host folder and other drives fall back to the URL unchanged. This does not loosen any offline guard: the drive check and the UNC refusal are untouched. Optional: the new test checks only the prefix and suffix of the result; creating the file and reading it back, as the existing virtual-drive test in the module does, would be stronger. CI: passing.Generated by Claude Code
@Marvisak on GitHub · 2026-11-25 22:09 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing in favour of #2089, which fixes the same thing at the root, in the shared
files::translate, so every path-taking file API is covered as well as this media branch; the two edit the same lines ofmedia.rs. The change here reads correct and does not loosen the offline guard.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed