core: resolve default data_dir via XDG_DATA_HOME on non-Windows hosts #1151
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!1151
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1151/head"
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?
@DaniiL35 on GitHub · 2026-11-24 16:16 UTC · original
fix/config-xdg-data-dir→main· +77 −9 · 1 files · 1 commits · closed without mergingResolves #899
Problem
In
crates/victory-core/src/config.rs(line 20),data_diris documented:However,
default_dirresolved both"cache"and"data"using the exact same fallback chain (LOCALAPPDATA->XDG_CACHE_HOME->~/.cache).On Linux and macOS hosts where
VICTORY_DATA_DIRis not set, persistent saves, local storage, and crash logs were placed in volatile cache paths, risking deletion during standard cache cleanup.Fix
XDG_DATA_HOME(and fallback~/.local/share) for"data"on non-Windows hosts before falling back to cache paths.envlookup closure (default_dir_with), allowing pure unit testing of directory resolution.XDG_DATA_HOME,HOME/.local/sharefallback, and WindowsLOCALAPPDATAprecedence.All test inputs are synthetic; zero game data or binary blobs (Rule #1 compliant). Formatted with Rust 2024 edition.
Pull request closed