Reject persistent data directories inside the cache #194
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!194
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-194"
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?
@feanorsun on GitHub · 2026-11-26 11:11 UTC · original
feanorsun:fix/reject-data-dir-under-cache→main· +230 −1 · 5 files · 2 commits · openPersistent saves can be lost when a user clears the cache. This change checks the final
data_dirandcache_dirafter each setting has been resolved from the environment, the configuration file, or its default. It rejects equality and descendants. Siblings such ascacheandcache-old, and a cache below the data directory, remain valid.The first commit is an independent port of Luiz Neves's original patch, cherry-picked with
-xfromc7cf0baafc1cd3f465ae7a4208758c8423fafd71. The same configuration change appeared in the closed upstream PR #103. Original PR and diff · Upstream PR #103The follow-up covers both directions of a
VICTORY_DATA_DIRoverride. For directories that do not exist yet, it applies Win32 path spelling rules, preserves explicit verbatim paths, and checks the parent directory's case-sensitivity setting when the two spellings differ only in case. The Windows bindings were already in the workspace lockfile.Windows verification
cache\savesreturned a successful configuration...paths, overrides into and out of the cache, similarly named siblings, and ordinary versus verbatim Windows paths.Cargo used local dependencies offline. The regressions used temporary directories and injected environment values. Validation was limited to CPU configuration tests.
@kilolimaVI on GitHub · 2026-11-26 19:16 UTC · original
Tested locally on Windows 11 (Ryzen 7 8845HS / Radeon 780M, pinned toolchain 1.98.1):
cargo test -p victory-core --locked: 19 passed, 0 failed (includes the six new data/cache directory tests)cargo clippy -p victory-core --all-targets --all-features --locked -- -D warnings: cleanCargo.lockchange resolves with--lockedBranch is 14 commits behind main; tested as-is.
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.