victory play fails when the game is on a network (UNC) path #1072

Closed
opened 2026-11-28 12:44:05 +00:00 by anastasesg · 3 comments
anastasesg commented 2026-11-28 12:44:05 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by anastasesg on 2026-11-28T12:44:05Z.


victory play fails when the game is on a network (UNC) path

Summary

victory play cannot start a game whose executable is on an SMB share (e.g. \\192.168.1.104\dumps\...). It stops with a "not found" error that shows the path as UNC\192.168.1.104\dumps\..., which is not a valid path. victory run with the same game works.

Cause

apps/victory/src/play.rs, around lines 783-785 (same code in v2026.11.27.3 to .8):

let exe = std::fs::canonicalize(&exe).unwrap_or(exe);
// (Windows' own long form `\\?\C:\...` back to the plain one.)
let exe = PathBuf::from(exe.to_string_lossy().trim_start_matches(r"\\?\").to_owned());

On Windows canonicalize returns the verbatim form. For a drive path that is \\?\C:\..., and stripping \\?\ gives C:\... (correct). For a network path it is \\?\UNC\server\share\..., and stripping \\?\ leaves UNC\server\share\... (invalid).

Mapped drives, subst and symlinks do not help: canonicalize resolves them back to the UNC target.

Suggested fix

Map \\?\UNC\ back to \\ and strip a plain \\?\ only for drive paths:

let exe = std::fs::canonicalize(&exe).unwrap_or(exe);
// Windows' verbatim forms back to plain ones: `\\?\UNC\srv\share` -> `\\srv\share`,
// `\\?\C:\...` -> `C:\...`.
let exe = {
    let s = exe.to_string_lossy();
    if let Some(rest) = s.strip_prefix(r"\\?\UNC\") {
        PathBuf::from(format!(r"\\{rest}"))
    } else if let Some(rest) = s.strip_prefix(r"\\?\") {
        PathBuf::from(rest)
    } else {
        exe.clone()
    }
};

Alternatives: std::path::absolute(&exe) (no verbatim prefix is added), or the dunce::canonicalize crate.

Note: the patch is untested, since I could not build the project. There may be other places in play that also assume a drive-letter path (for example the streamline_dir lookup or the working directory passed to child processes).

Environment

  • victory.exe v2026.11.27.7 and .8, Windows 11, game dump served over SMB from a Samba share.
  • Workaround: launch with victory run and set the environment by hand, which loses the F1-menu settings persistence and the automatic first-run restart.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6665232084 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1072). Originally posted by [anastasesg](https://github.com/anastasesg) on 2026-11-28T12:44:05Z. --- # `victory play` fails when the game is on a network (UNC) path ## Summary `victory play` cannot start a game whose executable is on an SMB share (e.g. `\\192.168.1.104\dumps\...`). It stops with a "not found" error that shows the path as `UNC\192.168.1.104\dumps\...`, which is not a valid path. `victory run` with the same game works. ## Cause `apps/victory/src/play.rs`, around lines 783-785 (same code in v2026.11.27.3 to .8): ```rust let exe = std::fs::canonicalize(&exe).unwrap_or(exe); // (Windows' own long form `\\?\C:\...` back to the plain one.) let exe = PathBuf::from(exe.to_string_lossy().trim_start_matches(r"\\?\").to_owned()); ``` On Windows `canonicalize` returns the verbatim form. For a drive path that is `\\?\C:\...`, and stripping `\\?\` gives `C:\...` (correct). For a network path it is `\\?\UNC\server\share\...`, and stripping `\\?\` leaves `UNC\server\share\...` (invalid). Mapped drives, `subst` and symlinks do not help: `canonicalize` resolves them back to the UNC target. ## Suggested fix Map `\\?\UNC\` back to `\\` and strip a plain `\\?\` only for drive paths: ```rust let exe = std::fs::canonicalize(&exe).unwrap_or(exe); // Windows' verbatim forms back to plain ones: `\\?\UNC\srv\share` -> `\\srv\share`, // `\\?\C:\...` -> `C:\...`. let exe = { let s = exe.to_string_lossy(); if let Some(rest) = s.strip_prefix(r"\\?\UNC\") { PathBuf::from(format!(r"\\{rest}")) } else if let Some(rest) = s.strip_prefix(r"\\?\") { PathBuf::from(rest) } else { exe.clone() } }; ``` Alternatives: `std::path::absolute(&exe)` (no verbatim prefix is added), or the `dunce::canonicalize` crate. Note: the patch is untested, since I could not build the project. There may be other places in `play` that also assume a drive-letter path (for example the `streamline_dir` lookup or the working directory passed to child processes). ## Environment - victory.exe v2026.11.27.7 and .8, Windows 11, game dump served over SMB from a Samba share. - Workaround: launch with `victory run` and set the environment by hand, which loses the F1-menu settings persistence and the automatic first-run restart.
github-actions[bot] commented 2026-11-28 12:44:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-28T12:44:13Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7239431387 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1072#issuecomment-7239431387). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T12:44:13Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
cloph-dsp commented 2026-11-28 12:46:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-28T12:46:31Z.


I'll take this one: add a small helper in apps/victory/src/play.rs that maps \\?\UNC\srv\share\... back to \\srv\share\... (and a plain \\?\C:\... to C:\...), use it right after canonicalize, and cover both forms plus an already-plain path with a synthetic unit test. No game data or hardware involved.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7239457448 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1072#issuecomment-7239457448). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-28T12:46:31Z. --- I'll take this one: add a small helper in `apps/victory/src/play.rs` that maps `\\?\UNC\srv\share\...` back to `\\srv\share\...` (and a plain `\\?\C:\...` to `C:\...`), use it right after `canonicalize`, and cover both forms plus an already-plain path with a synthetic unit test. No game data or hardware involved.
trustno1-coder commented 2026-11-29 19:47:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T19:47:15Z.


Closing this one because it was reported on a build from before v2026.11.28.03 (more than 4 releases ago) and has had no activity since v2026.11.29.01. A lot has changed since then.

If it still happens on the latest release, please open a new issue with the play log and crashes.log from that run. Thanks for reporting!

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7261554711 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1072#issuecomment-7261554711). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-29T19:47:15Z. --- Closing this one because it was reported on a build from before v2026.11.28.03 (more than 4 releases ago) and has had no activity since v2026.11.29.01. A lot has changed since then. If it still happens on the [latest release](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/latest), please open a new issue with the play log and crashes.log from that run. Thanks for reporting!
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
trustno1-coder/VIctory-NVIDIA#1072
No description provided.