Config: read victory.toml beside the executable; name a missing path (#3872) #3895
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3895"
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 Marvisak/VIctory. Originally posted by MannA-001 on 2026-11-30T14:15:08Z.
Fixes the two causes of #3872 that are in this repository.
What happens
victory.exeis ignored.Config::loadreadsVICTORY_CONFIG, else./victory.tomlin the working folder. Avictory.exestarted from a shortcut, by double-click, or from another terminal folder does not see thevictory.tomledited next to it. It silently falls back to the defaults and then fails with "The system cannot find the path specified (os error 3)". That is the report: "I've edited victory.toml for it to work", and it still cannot find the path.translate --cacheover a missinggame_dirprintscontainers 0 in 0.0 s: 0 already cached, 0 translated, 0 refusedand exits 0, with nothing in the log.Change
victory-core::config: withoutVICTORY_CONFIGand without./victory.toml, thevictory.tomlin the executable's folder is read (default_config_path)../victory.tomlstill comes first, so existing setups are unchanged.victory configalready prints which file was used.apps/victory:default_paths(used bytranslate,census,shader-info) fails on the first path that does not exist, naming it and pointing atvictory config. This covers paths given on the command line too.Verification
the_config_beside_the_executable_is_read(victory-core) anda_path_that_does_not_exist_is_named(victory).cargo test -p victory-core: 14 passed.cargo test -p victory --bin victory: 15 passed.cargo clippy -p victory-core -p victory --all-targets -- -D warnings: clean.victory.tomlbeside a copiedvictory.exe, run from another folder,victory configshowsconfig file : <exe folder>\victory.tomland itsgame_dir. WithVICTORY_GAME_DIRset to a missing folder,translate --cacheexits 1 withError: C:\does\not\exist does not exist (victory configshows the paths in use and where they come from).Not covered: the "warm shaders" command named in the report belongs to the forks (this tree has
translate --cache). They shareConfig::load, so they get the config fix once they rebase.AI use: Claude Code (Claude Opus 5.5).
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-30T14:20:49Z.
AI-assisted verification (Hy4 flash) — Windows / rustc 1.100.0 / MSVC, no game data.
Independent check of PR #3895 (OPEN, MERGEABLE, CLEAN, non-draft, 0 formal approvals, no prior comment from me).
Isolated worktree
D:\Victory-Contrib\pr-3895-watchwith dedicatedCARGO_TARGET_DIR=D:\Victory-Contrib\target-3895(never shared). Base63bcca43c6a00a758510398fa43096ce7e4f7df0, head37932d80eb83c96b02e697cdea77d5d2e873b530.Negative control (new tests on base):
git grep -F a_path_that_does_not_exist_is_named 63bcca43.. -- apps/victory/src/main.rs→ exit 1 (no match);git grep -F the_config_beside_the_executable_is_read 63bcca43.. -- crates/victory-core/src/config.rs→ exit 1 (no match). Both tests are new.git diff --check 63bcca43..37932d8→ exit 0 (clean).Tests (module-qualified,
--exact,--test-threads=1):cargo test --locked -p victory --bin victory -- tests::a_path_that_does_not_exist_is_named --exact --test-threads=1 --quiet→1 passed; 0 failed; 0 ignored; 0 measured; 14 filtered out, exit 0.cargo test --locked -p victory-core --lib -- config::tests::the_config_beside_the_executable_is_read --exact --test-threads=1 --quiet→1 passed; 0 failed; 0 ignored; 0 measured; 13 filtered out, exit 0.Both pass with synthetic inputs only (temporary paths created by the tests). No GPU/driver involved or required (N/A); no specific GPU profile used. No game data, assets, extracted shaders, DRM or decrypt content was accessed, used or uploaded.
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T14:00:26Z.
A shortcut-style launch on Windows at
37932d80picked up the configuration beside the executable. A working-directory configuration took precedence, and an explicitVICTORY_CONFIGoverrode both. One detail matters for relative paths. Withgame_dir = 'exe-marker'in the configuration beside the executable,shader-inforeported the directory missing when it existed only beside the executable. Creating the same relative directory under the working directory made the command succeed. This used a copied CLI and empty synthetic directories.AI-assisted verification with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by MannA-001 on 2026-12-01T17:28:36Z.
@passerbyyhx Thanks, that was a real gap.
14bcecbreads relative paths in a config file from the folder that holds it, sogame_dir = 'exe-marker'in thevictory.tomlbeside the executable now finds theexe-markerbeside it, from any working folder. Absolute paths and./victory.tomlbehave as before. One side effect: a relative path in a file named byVICTORY_CONFIGis now read from that file's folder rather than the working folder, which I think is what anyone writing one expects. New test:relative_paths_in_a_config_file_are_read_from_its_folder.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.