fix(cli): keep network-share paths when victory play starts a title #93

Merged
Caasares merged 1 commit from upstream-pr/93 into main 2026-11-28 19:01:28 +00:00
Caasares commented 2026-11-27 17:57:37 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Caasares on 2026-11-27T17:57:37Z.


victory play (and a start with no command, a double click) takes the title's executable through fs::canonicalize and then removes the \\?\ prefix by trimming the string. On Windows, canonicalize returns a path on a network share, or on a mapped drive, in its verbatim UNC form: \\?\UNC\server\share\.... Removing only \\?\ leaves UNC\server\share\..., which is a relative path that does not exist.

Impact: a title kept on a NAS or a mapped drive cannot be started with victory play, because it is read from UNC\.... The settings menu's restart line (VICTORY_MENU_ARGS) carries the same broken path.

Probe, on a local share:

canonicalize  \\localhost\Users\...\title.exe  ->  \\?\UNC\localhost\Users\...\title.exe
old expression                                  ->  UNC\localhost\Users\...\title.exe   (exists: false)

A local path (C:\...) was never affected.

Fix

without_verbatim_prefix(): \\?\UNC\server\share\x becomes \\server\share\x, \\?\C:\x becomes C:\x, and any other path is left alone. prepare uses it in place of the string trim.

Verification

  • New unit test play::tests::the_verbatim_prefix_goes_and_a_share_keeps_its_server. It passes with the fix. With the old expression in place it fails with left: "UNC\\nas\\games\\GTA6\\game_scarlett_master.exe", right: "\\\\nas\\games\\GTA6\\game_scarlett_master.exe".
  • End to end, with a non-PE file on a share: victory.exe play \\localhost\Users\...\fake-title.exe now gets past the path and reads the file, then fails in the PE parser (malformed image: Unknown file magic). The path it hands on is now a real one.
  • cargo test -p victory --locked: all pass.
  • cargo clippy -p victory --all-targets: no diagnostics in play.rs. The crate's one diagnostic (warm.rs:102, manual_is_multiple_of) exists on main and is not touched here.
  • rustfmt: play.rs already has formatting differences on main; none is on a line this PR adds.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5531010319 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/93). Originally posted by [Caasares](https://github.com/Caasares) on 2026-11-27T17:57:37Z. --- `victory play` (and a start with no command, a double click) takes the title's executable through `fs::canonicalize` and then removes the `\\?\` prefix by trimming the string. On Windows, `canonicalize` returns a path on a network share, or on a mapped drive, in its verbatim UNC form: `\\?\UNC\server\share\...`. Removing only `\\?\` leaves `UNC\server\share\...`, which is a relative path that does not exist. Impact: a title kept on a NAS or a mapped drive cannot be started with `victory play`, because it is read from `UNC\...`. The settings menu's restart line (`VICTORY_MENU_ARGS`) carries the same broken path. Probe, on a local share: ``` canonicalize \\localhost\Users\...\title.exe -> \\?\UNC\localhost\Users\...\title.exe old expression -> UNC\localhost\Users\...\title.exe (exists: false) ``` A local path (`C:\...`) was never affected. ### Fix `without_verbatim_prefix()`: `\\?\UNC\server\share\x` becomes `\\server\share\x`, `\\?\C:\x` becomes `C:\x`, and any other path is left alone. `prepare` uses it in place of the string trim. ### Verification - New unit test `play::tests::the_verbatim_prefix_goes_and_a_share_keeps_its_server`. It passes with the fix. With the old expression in place it fails with `left: "UNC\\nas\\games\\GTA6\\game_scarlett_master.exe"`, `right: "\\\\nas\\games\\GTA6\\game_scarlett_master.exe"`. - End to end, with a non-PE file on a share: `victory.exe play \\localhost\Users\...\fake-title.exe` now gets past the path and reads the file, then fails in the PE parser (`malformed image: Unknown file magic`). The path it hands on is now a real one. - `cargo test -p victory --locked`: all pass. - `cargo clippy -p victory --all-targets`: no diagnostics in `play.rs`. The crate's one diagnostic (`warm.rs:102`, `manual_is_multiple_of`) exists on `main` and is not touched here. - `rustfmt`: `play.rs` already has formatting differences on `main`; none is on a line this PR adds.
1tsethan commented 2026-11-27 23:01:17 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1tsethan on 2026-11-27T23:01:17Z.


Independent Windows validation of PR #93.

Tested commit: 0bf686cb95e365a1be8fa235f8ba23a646ca221c.

cargo test --locked -p victory the_verbatim_prefix_goes_and_a_share_keeps_its_server -- --nocapture

Exit: 0.

  • test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 19 filtered out; finished in 0.00s

The synthetic UNC normalization test is separate from current-main integration: merge-tree reports a conflict against df2daaf. No live network share launch was tested.

Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7229806906 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/93#issuecomment-7229806906). Originally posted by [1tsethan](https://github.com/1tsethan) on 2026-11-27T23:01:17Z. --- Independent Windows validation of PR #93. Tested commit: `0bf686cb95e365a1be8fa235f8ba23a646ca221c`. `cargo test --locked -p victory the_verbatim_prefix_goes_and_a_share_keeps_its_server -- --nocapture` Exit: **0**. - test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 19 filtered out; finished in 0.00s The synthetic UNC normalization test is separate from current-main integration: merge-tree reports a conflict against df2daaf. No live network share launch was tested. Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result. <!-- victory-native-validation-20261128 -->
Sign in to join this conversation.
No reviewers
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
trustno1-coder/VIctory-NVIDIA!93
No description provided.