HLE media: translate \??\<drive> virtual-drive URLs via files::translate #2408

Open
opened 2026-11-25 13:07:26 +00:00 by pushkarreddyy · 2 comments
pushkarreddyy commented 2026-11-25 13:07:26 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-25T13:07:26Z.


Summary

In crates/victory-hle/src/modules/media.rs (local()), \??\<drive> object-manager paths return Ok(with_nul(url)) directly without passing through files::translate, unlike \\?\<drive> paths.

When a title passes a virtual-drive path with the \??\ prefix (e.g. \??\G:\video.mp4), the host Media Foundation source resolver receives the untranslated virtual drive letter instead of the host folder.

Expected

Translate \??\<drive> virtual-drive paths via files::translate (preserving \??\<drive> untouched when the drive is not a virtual mount).

Claiming this issue and opening a PR with regression tests shortly.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6605184090 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2410). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-11-25T13:07:26Z. --- ### Summary In `crates/victory-hle/src/modules/media.rs` (`local()`), `\??\<drive>` object-manager paths return `Ok(with_nul(url))` directly without passing through `files::translate`, unlike `\\?\<drive>` paths. When a title passes a virtual-drive path with the `\??\` prefix (e.g. `\??\G:\video.mp4`), the host Media Foundation source resolver receives the untranslated virtual drive letter instead of the host folder. ### Expected Translate `\??\<drive>` virtual-drive paths via `files::translate` (preserving `\??\<drive>` untouched when the drive is not a virtual mount). *Claiming this issue and opening a PR with regression tests shortly.*
Marvisak commented 2026-11-25 16:09:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:43:59Z.


Automated triage for the maintainers.

Confirmed on main (da82e44): in crates/victory-hle/src/modules/media.rs, local() returns Ok(with_nul(url)) for a \??\<drive>: URL, while the \\?\<drive>: branch falls through to files::translate. files::translate (crates/victory-hle/src/modules/files.rs) only recognises the \\?\ prefix, so a \??\ path on a virtual drive reaches the host resolver untranslated.

Open PR #2416 addresses this (rewrites the prefix to \\?\ before calling files::translate, with a unit test).


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7167281228 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2410#issuecomment-7167281228). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T15:43:59Z. --- <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T13:07:26Z at=2026-11-25T15:43:44Z --> Automated triage for the maintainers. Confirmed on main (da82e44): in `crates/victory-hle/src/modules/media.rs`, `local()` returns `Ok(with_nul(url))` for a `\??\<drive>:` URL, while the `\\?\<drive>:` branch falls through to `files::translate`. `files::translate` (`crates/victory-hle/src/modules/files.rs`) only recognises the `\\?\` prefix, so a `\??\` path on a virtual drive reaches the host resolver untranslated. Open PR #2416 addresses this (rewrites the prefix to `\\?\` before calling `files::translate`, with a unit test). --- _Generated by [Claude Code](https://claude.ai/code)_
andrewpozdnakov7-jpg commented 2026-11-26 16:05:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T15:27:11Z.


Opened PR #3273: the ??<drive> spelling now goes through iles::translate like \?<drive>, so ??\G:\video.mp4 reaches Media Foundation as the host folder. A host drive is left exactly as the title spelled it, prefix included. CI check passed (3m7s), the PR is clean on main. The coordination claim is in #1633.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7196286368 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2410#issuecomment-7196286368). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T15:27:11Z. --- Opened [PR #3273](https://github.com/Marvisak/VIctory/pull/3273): the \??\<drive> spelling now goes through iles::translate like \\?\<drive>, so \??\G:\video.mp4 reaches Media Foundation as the host folder. A host drive is left exactly as the title spelled it, prefix included. CI check passed (3m7s), the PR is clean on main. The [coordination claim](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7196205563) is in #1633.
Sign in to join this conversation.
No labels
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.

Reference
Marvisak/VIctory#2408
No description provided.