HLE: match Windows executable paths case- and separator-insensitively on relaunch #3464
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3464
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3464"
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?
@alexandruiulian201-bot on GitHub · 2026-11-27 03:49 UTC · original
alexandruiulian201-bot:fix/relaunch-args-windows-case→main· +39 −2 · 1 files · 1 commits · openProblem
In
crates/victory-hle/src/modules/xgame.rs,relaunch_argsmatches the startup executable argument againstcurrent(runtime::image_path) using exactOsStrequality. On Windows, if the user launchedvictory runwith different ASCII casing or forward slashes (for example,g:/game/gta6.exevsG:\Game\GTA6.exe), the executable slot is not matched andXLaunchNewGamerelaunches the original executable instead ofexe.Fix
same_pathhelper that compares paths case-insensitively (ASCII) and treats/and\equivalently on Windows, while keeping exact comparison on non-Windows targets.same_pathinrelaunch_argsfor both direct andstd::path::absolute-normalized comparisons.a_relaunch_matches_windows_executable_paths_case_and_separator_insensitively.Verification
cargo test -p victory-hle --lib --locked modules::xgame::tests::: all passed.cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean.cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings: clean.cargo run -p xtask --locked -- policy:191 files ok.AI-assisted. Synthetic unit test only (no game files used).
@cloph-dsp on GitHub · 2026-11-27 04:17 UTC · original
Independent CPU-only verification on Windows (Rust 1.100.0/MSVC, per-worktree CARGO_TARGET_DIR, CARGO_BUILD_JOBS=2, no game data).
1322d45f, base63bcca4.cargo test --locked -p victory-hle --lib -- modules::xgame::tests::a_relaunch_matches_windows_executable_paths_case_and_separator_insensitively --exact --test-threads=1 --quiet->test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 152 filtered out.git diff --check 63bcca4 HEAD-> exit 0.63bcca4viagit grepon the file (no output, exit 1).Note: only the named synthetic path test was replayed; a full crate suite was not run. The bare test name matches 0 tests; the module-qualified name is required. GPU/driver: N/A. AI-assisted (Hy4 flash). No game data, assets, extracted shaders or DRM.
@AurumCarlos on GitHub · 2026-11-27 10:24 UTC · original · reviewed
I don't think the mismatch this fixes can happen at runtime.
currentisstd::path::absoluteof the very argumentrelaunch_argssearches for:run.rs:85records thevictory runargument withset_image_path(image.base(), exe), andruntime.rs:29storesstd::path::absolute(path).launch_new_gamethen compares it withargs_os(), which holds that same argument.main, the second check (xgame.rs:113,std::path::absolute(a) == current) already matchesg:/game/gta6.exe: both sides are the sameGetFullPathNameWresult, with the same case and\separators. The new test builds acurrent(G:\Game\GTA6.exe) that the runtime never produces from that argument.Unless there's a path where the image path is recorded differently from the launch argument, this is a guard for a case that doesn't occur. If there is one, a test that goes through
set_image_pathwould show it.@passerbyyhx on GitHub · 2026-11-27 18:53 UTC · original
I ran the Windows CLI on
1322d45f5a9e220ae7a1b1759f38242e87ae6d3cand parent63bcca43c6a00a758510398fa43096ce7e4f7df0. A synthetic guest A asks XLaunchNewGame to start guest B. B returns 73 only if its new argument arrived and the original one was removed. Direct controls distinguish an accidentally restarted A (41) and B with stale arguments (74).Both builds launched B with marker 73 in all four cases: absolute, mixed-case relative with mixed separators, mixed-case absolute with forward slashes, and verbatim absolute paths. All three marker controls also passed. The ordinary startup path derives the saved image path from the CLI input. This verifies the relaunch end to end but did not produce a parent failure; a real producer of differing spellings would still help establish when this patch changes behavior.
Synthetic fixture. GTA-VI-3/EIGHT-20261127. AI-assisted with Codex.
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.