victory play: keep network shares when stripping verbatim paths (#1072) #1076
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1076"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-28T12:51:20Z.
Depends on: #1072
What
victory playcanonicalizes the executable path and strips\\?\. On Windows,canonicalizereturns\\?\UNC\server\share\...for a network path, so stripping only the prefix leaves the invalidUNC\server\share\.... This adds a smallplain_pathhelper that maps\\?\UNC\...back to\\...while keeping the existing\\?\C:\...→C:\...behaviour, and uses it right aftercanonicalize.Change
apps/victory/src/play.rs: newplain_path(PathBuf) -> PathBuf;preparenow calls it on the canonicalized path.apps/victory/src/play.rstests:verbatim_paths_keep_the_network_sharecovers the UNC form, the drive-letter form and an already-plain UNC path.Validation
Windows, Rust 1.100.0/MSVC,
--locked, per-worktreeCARGO_TARGET_DIR(target-unc-path),CARGO_BUILD_JOBS=2:cargo test --locked -p victory --bin victory -- play::tests::verbatim_paths_keep_the_network_share --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 26 filtered, exit 0.cargo test --locked -p victory --bin victory -- play::tests --test-threads=1 --quiet→ 12 passed, 0 failed, 15 filtered, exit 0.git diff --checkclean (1 file, +21/-3).Only synthetic path strings were used. GPU/driver: N/A (path handling only). No game data, assets, extracted shaders, DRM or decrypt involved.
AI-assisted (Hy4 flash).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jptorres96 on 2026-11-28T14:30:15Z.
Checked this at
467d074(base63b902f) on Windows build 26300 with rustc 1.98.1, against a real UNC path. The admin share\\localhost\C$gives one without any network.I added a throwaway test, not for commit, that runs
\\localhost\C$\Windows\System32\notepad.exethroughstd::fs::canonicalize. It then compares the old strip withplain_path:So on a real share #1072 reproduces exactly as reported, and this fixes it.
new.parent()is\\localhost\C$\Windows\System32, which is allprepareandmod_dllstake from the path. Nothing else inplay.rsassumes a drive letter: the other uses of the path go throughparent(), andcensus.rsusescanonicalizeonly as an identity.cargo test --locked -p victory --bin victory -- play::tests --test-threads=1: 12/12, plus the throwaway one.cargo clippy -p victory --all-targets --no-deps -- -D warnings: clean.Two small notes:
\\?\prefix, becauseto_str()givesNone. Before,to_string_lossystripped it. A verbatim path still opens, so this is harmless.without_verbatim_prefix, but it is based on29d8dbfand no longer merges cleanly on63b902f(conflict inplay.rs). One of the two can be closed when the other lands.No game files.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by anastasesg on 2026-11-28T14:54:22Z.
Tested #1076 (commit
467d0746, built from the PR head) on Windows 11, RTX 5070, with the game dump on an SMB share. victory play \192.168.1.104\dumps\…\game_scarlett_master.exe now starts the game. The play log shows the dump mapped as \192.168.1.104\dumps\… and no UNC\… path anywhere. Before the change it stopped on UNC\192.168.1.104\…. Nothing else in play broke on the network path in this run. Thanks for the quick fix.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.