HLE/Media: translate \??\<drive>:\ NT object-manager paths through virtual drive mounts #3030

Closed
github-bot wants to merge 1 commit from gh-pr/3030/head into gh-pr/3030/base
Owner

@⁠RVZO6 on GitHub · 2026-11-26 03:59 UTC · original
RVZO6:rvzo/media-nt-path-translate → main · +33 −2 · 1 files · 1 commits · closed without merging

media::local (crates/victory-hle/src/modules/media.rs:61-67) previously returned Ok(with_nul(url)) immediately for \??\<drive>:\... paths, bypassing files::translate even though \\?\<drive>:\... paths right above (L56-60) rewrite mounted virtual console drives (G:\, T:\, etc.) to their host directories.

Convert \??\<rest> to \\?\<rest> and pass it to files::translate, falling back to with_nul(url) when the drive is not a mounted virtual drive so:

  • Mounted virtual drives (e.g. \??\G:\movies\clip.mp4) resolve identically to \\?\G:\movies\clip.mp4.
  • Unmounted drives (e.g. \??\C:\Windows\a.wav) preserve their original \??\ spelling.
  • Non-drive \??\ paths (e.g. \??\UNC\server\share\a.mp4) remain rejected as shares.

Disjoint from #663 (which does not modify local()'s \??\ branch).

Verification

  • Negative control (before fix): object_manager_prefix_translates_virtual_drives failed (left: "\\??\\Y:\\movies\\clip.mp4", right: "\\\\?\\...\\movies\\clip.mp4").
  • After fix: all 6 modules::media::tests pass.
  • Official Windows MSVC + WARP SM 6.6 CI (Rust 1.98.1, default + --tests + --features diagnostics clippy, xtask policy, full workspace tests): RVZO6/VIctory CI run #45748741503 (green, combined Wave 10 check on 63bcca4).
  • Not run: the title; any hardware GPU.

AI-assisted: T3 Code (Antigravity, gemini-4-neon).

**@⁠RVZO6** on GitHub · 2026-11-26 03:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/3030) `RVZO6:rvzo/media-nt-path-translate` → `main` · +33 −2 · 1 files · 1 commits · closed without merging `media::local` (`crates/victory-hle/src/modules/media.rs:61-67`) previously returned `Ok(with_nul(url))` immediately for `\??\<drive>:\...` paths, bypassing `files::translate` even though `\\?\<drive>:\...` paths right above (`L56-60`) rewrite mounted virtual console drives (`G:\`, `T:\`, etc.) to their host directories. Convert `\??\<rest>` to `\\?\<rest>` and pass it to `files::translate`, falling back to `with_nul(url)` when the drive is not a mounted virtual drive so: - Mounted virtual drives (e.g. `\??\G:\movies\clip.mp4`) resolve identically to `\\?\G:\movies\clip.mp4`. - Unmounted drives (e.g. `\??\C:\Windows\a.wav`) preserve their original `\??\` spelling. - Non-drive `\??\` paths (e.g. `\??\UNC\server\share\a.mp4`) remain rejected as shares. Disjoint from #663 (which does not modify `local()`'s `\??\` branch). ### Verification - **Negative control (before fix):** `object_manager_prefix_translates_virtual_drives` failed (`left: "\\??\\Y:\\movies\\clip.mp4"`, `right: "\\\\?\\...\\movies\\clip.mp4"`). - **After fix:** all 6 `modules::media::tests` pass. - Official Windows MSVC + WARP SM 6.6 CI (Rust 1.98.1, default + `--tests` + `--features diagnostics` clippy, `xtask policy`, full workspace tests): [RVZO6/VIctory CI run #45748741503](https://github.com/RVZO6/VIctory/actions/runs/45748741503) (green, combined Wave 10 check on `63bcca4`). - **Not run:** the title; any hardware GPU. AI-assisted: T3 Code (Antigravity, gemini-4-neon).
media::local previously returned `with_nul(url)` immediately for
`\??\<drive>:\...` paths, bypassing `files::translate` even though
`\\?\<drive>:\...` paths right above it translate mounted console drives
(`G:\`, `T:\`, etc.) to their host paths.

Convert `\??\<rest>` to `\\?\<rest>` for `files::translate`, falling back
to `with_nul(url)` when the drive is not a mounted virtual drive so
unmounted `\??\C:\...` paths keep their original spelling and non-drive
`\??\UNC\...` paths remain rejected. Disjoint from #663.

Assisted-by: T3 Code (Antigravity, gemini-4-neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:26:57 +00:00
github-bot closed this pull request 2026-11-26 06:26:57 +00:00
Author
Owner

@⁠RVZO6 on GitHub · 2026-11-26 06:01 UTC · original

Closing in favor of #2089, which already fixes \??\ virtual-drive translation in both files.rs and media.rs (matching the second-look review on #2416).

**@⁠RVZO6** on GitHub · 2026-11-26 06:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/3030#issuecomment-7184024073) Closing in favor of #2089, which already fixes `\??\` virtual-drive translation in both `files.rs` and `media.rs` (matching the second-look review on #2416).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3030
No description provided.