Config: an empty VICTORY_CONFIG means unset (port of VIctory#363) #52
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/uiliannn--VItoriaBr!52
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-52"
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?
@lcg007xd-c on GitHub · 2026-11-25 20:53 UTC · original
lcg007xd-c:port/empty-victory-config→main· +20 −1 · 1 files · 2 commits · openWhat
Config::loadtreated an emptyVICTORY_CONFIGas an explicit path.PathBuf::from("")is not a file, so startup aborted with "VICTORY_CONFIG points at , which does not exist". The other path variables already treat an empty value as unset. This one now does too:VICTORY_CONFIG=falls back to./victory.toml(or to no config file), and a non-empty value still selects that exact file.This comes up with launchers and scripts that always export the variable, sometimes empty.
Port
Cherry-pick (
-x) ofgithub.com/Marvisak/VIctory@fd44561from upstream https://github.com/Marvisak/VIctory/pull/363. Enzo Souza Duarte is still the commit author. It applied cleanly.Test
empty_config_env_is_ignoredcovers the empty and non-empty cases through the newexplicit_config_pathhelper. The helper is new, so the test doesn't compile against the old code. The old behaviour is the bug:std::env::var_osreturnedSome(""), which was used as the path.How this was checked (Linux, no Windows PC or game files)
cargo clippy -p victory-core -p victory-pe -p victory-pipeline -p victory-shader -p victory-formats -p victory-game -p xtask --all-targets --locked -- -D warnings, thencargo teston the same crates (rebased on currentmain).cargo clippywith the same crates and--target x86_64-pc-windows-msvc(check only, no link) is clean.rustfmt --checkis clean on the changed file.Not tested: Windows runtime, GPU (D3D12/DXIL validation) and the game itself.
🤖 Generated with Claude Code
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.