HLE media: translate \??\<drive> virtual-drive URLs (fixes #2410) #2414
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2416"
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?
Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-25T13:08:54Z.
Fixes #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.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T13:19:29Z.
Review: COMMENTED
HLE media: ??<drive> virtual-drive URLs translated through files::translate. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T13:19:31Z.
Review: APPROVED
Verified against
origin/main(940d32f):\??\<drive>virtual-drive URLs in HLE media (#2410) is clean and well-tested while still refusing network shares.cargo test -p victory-hle media::: 6/6 passed (includingobject_prefix_translates_virtual_drives).cargo clippy -p victory-hle --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-25T13:36:19Z.
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!Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-25T14:19:09Z.
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)
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:28:55Z.
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
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:09:21Z.
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