fix(config): keep the data directory out of the cache root #708

Open
github-bot wants to merge 1 commit from github-bot/gh-708 into main AGit
Owner

@⁠Loggerten on GitHub · 2026-11-24 07:10 UTC · original
Loggerten:fix/data-dir-outside-cache → main · +109 −14 · 1 files · 1 commits · open

What

default_dir resolved both the cache and the data directory from LOCALAPPDATA, then XDG_CACHE_HOME, then $HOME/.cache. On any host without LOCALAPPDATA — Linux, or Windows with it unset — the data directory therefore landed at <cache>/victory/data.

Config documents the data directory as:

/// What titles write and must keep (persistent local storage). Never
/// inside the cache, which may be deleted at any time.

So saves could be placed in a root the docs say may be deleted at any time.

Observed

With HOME=/tmp/probe-home, XDG_CACHE_HOME=/tmp/probe-home/.cache, LOCALAPPDATA unset, Config::load() returned:

cache_dir = /tmp/probe-home/.cache/victory/cache
data_dir  = /tmp/probe-home/.cache/victory/data

Fix

Split the two defaults:

  • Windows, unchanged: LOCALAPPDATA provides both victory/cache and victory/data.
  • Elsewhere: the cache keeps XDG_CACHE_HOME or $HOME/.cache; the data directory uses XDG_DATA_HOME or $HOME/.local/share.

The environment-variable and config-file precedence is untouched. Both functions now take the environment lookup as a parameter, so the regression test needs no unsafe environment mutation (edition 2024 makes set_var unsafe).

Test

config::tests::data_dir_not_under_cache_without_localappdata asserts, with LOCALAPPDATA unset:

cache = /tmp/probe-home/.cache/victory/cache
data  = /tmp/probe-home/.local/share/victory/data
!data.starts_with("/tmp/probe-home/.cache")

Verification

  • cargo test -p victory-core — 9 passed, 0 failed.
  • cargo clippy -p victory-core --all-targets — no warnings.
  • rustfmt --check clean on the changed file.
  • One file changed, +50/−10.

I could only build victory-core on this machine: victory-gpu and victory-hle do not compile on a non-Windows host (E0425: cannot find function host_resource), so I left them alone.

**@⁠Loggerten** on GitHub · 2026-11-24 07:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/708) `Loggerten:fix/data-dir-outside-cache` → `main` · +109 −14 · 1 files · 1 commits · open ## What `default_dir` resolved both the cache and the data directory from `LOCALAPPDATA`, then `XDG_CACHE_HOME`, then `$HOME/.cache`. On any host without `LOCALAPPDATA` — Linux, or Windows with it unset — the data directory therefore landed at `<cache>/victory/data`. `Config` documents the data directory as: ```rust /// What titles write and must keep (persistent local storage). Never /// inside the cache, which may be deleted at any time. ``` So saves could be placed in a root the docs say may be deleted at any time. ## Observed With `HOME=/tmp/probe-home`, `XDG_CACHE_HOME=/tmp/probe-home/.cache`, `LOCALAPPDATA` unset, `Config::load()` returned: ``` cache_dir = /tmp/probe-home/.cache/victory/cache data_dir = /tmp/probe-home/.cache/victory/data ``` ## Fix Split the two defaults: - **Windows, unchanged:** `LOCALAPPDATA` provides both `victory/cache` and `victory/data`. - **Elsewhere:** the cache keeps `XDG_CACHE_HOME` or `$HOME/.cache`; the data directory uses `XDG_DATA_HOME` or `$HOME/.local/share`. The environment-variable and config-file precedence is untouched. Both functions now take the environment lookup as a parameter, so the regression test needs no unsafe environment mutation (edition 2024 makes `set_var` unsafe). ## Test `config::tests::data_dir_not_under_cache_without_localappdata` asserts, with `LOCALAPPDATA` unset: ``` cache = /tmp/probe-home/.cache/victory/cache data = /tmp/probe-home/.local/share/victory/data !data.starts_with("/tmp/probe-home/.cache") ``` ## Verification - `cargo test -p victory-core` — 9 passed, 0 failed. - `cargo clippy -p victory-core --all-targets` — no warnings. - `rustfmt --check` clean on the changed file. - One file changed, +50/−10. I could only build `victory-core` on this machine: `victory-gpu` and `victory-hle` do not compile on a non-Windows host (`E0425: cannot find function host_resource`), so I left them alone.
`default_dir` resolved both the cache and the data directory from
LOCALAPPDATA, then XDG_CACHE_HOME, then `$HOME/.cache`. On any host without
LOCALAPPDATA — Linux, or Windows with it unset — the data directory therefore
landed at `<cache>/victory/data`, inside a root the docs say may be deleted at
any time:

    /// What titles write and must keep (persistent local storage). Never
    /// inside the cache, which may be deleted at any time.

Split the two defaults. Windows behaviour is unchanged: LOCALAPPDATA still
provides both. Elsewhere the cache keeps XDG_CACHE_HOME or `$HOME/.cache`, and
the data directory moves to XDG_DATA_HOME or `$HOME/.local/share`.

Both take the environment lookup as a parameter, so the new test
`data_dir_not_under_cache_without_localappdata` needs no unsafe env mutation.

Review fixes:
- `env_dir` filters each variable before the `or_else` chain. A set-but-empty
  LOCALAPPDATA no longer hides XDG_CACHE_HOME / XDG_DATA_HOME, and an empty
  HOME no longer yields a relative `.cache/victory/cache`.
- `empty_test_titles_env_is_ignored` and `test_titles_env_splits_paths`, added
  on main after this branch point, now give their mock environment a HOME.
  Without it the mock hid the real environment and resolve() errored.
- New tests: empty LOCALAPPDATA falls through to XDG, XDG with no HOME, and an
  empty HOME errors instead of resolving to a relative path.

Existing saves under the old `<cache>/victory/data` are not migrated; set
VICTORY_DATA_DIR to that path to keep using them.

Verified: cargo test -p victory-core 15 passed, clippy -D warnings clean,
cargo xtask policy 154 files ok.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:47 +00:00
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 09:17 UTC · original

Tested 99f12d904 merged with main (8e79c80, clean git merge) on Windows 11 Pro (26100), Rust 1.98.1 (x86_64-pc-windows-msvc): needs rebase / fix before merge (2 test failures after merging main + 1 empty-env edge case).

1. Silent merge regression against main (8e79c80)

Git merges cleanly (crates/victory-core/src/config.rs), so the PR appears conflict-free, but cargo test -p victory-core --locked fails on two tests that were added on main after the branch point:

  • config::tests::empty_test_titles_env_is_ignored
  • config::tests::test_titles_env_splits_paths

Both panic at Config::resolve(file, None, env).unwrap() with:

cannot determine a user directory; set VICTORY_CACHE_DIR and VICTORY_DATA_DIR

Because default_cache_dir / default_data_dir now read LOCALAPPDATA/HOME through the injected env closure, those two tests also need "HOME" (or "LOCALAPPDATA") in their mock env, just like environment_overrides_file and empty_env_values_are_ignored.

2. Empty-string env fallback bug in default_cache_dir / default_data_dir

In both helpers:

let base = env("LOCALAPPDATA")
    .or_else(|| env("XDG_CACHE_HOME"))
    .filter(|v| !v.is_empty())
    .map(PathBuf::from)
    .or_else(|| env("HOME").map(|h| PathBuf::from(h).join(".cache")))
  • Because .filter(|v| !v.is_empty()) is applied after .or_else(...), if LOCALAPPDATA="" and XDG_CACHE_HOME (or XDG_DATA_HOME) is set, Some("") short-circuits .or_else(...) and is then filtered to None, skipping the XDG variable entirely. Filtering each env(...) lookup individually (e.g., via a small non_empty helper) avoids this.
  • Likewise, env("HOME") is not filtered for emptiness, so HOME="" resolves to relative .cache/victory/cache and .local/share/victory/data inside the current working directory.

(Note: on the PR head alone before merging main, victory-core tests and cargo xtask policy pass; the pre-existing victory-hle clippy warning on xmem.rs is already fixed on main.)

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 09:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7127211781) Tested `99f12d904` merged with `main` (`8e79c80`, clean git merge) on Windows 11 Pro (`26100`), Rust `1.98.1` (`x86_64-pc-windows-msvc`): **needs rebase / fix before merge** (2 test failures after merging `main` + 1 empty-env edge case). ### 1. Silent merge regression against `main` (`8e79c80`) Git merges cleanly (`crates/victory-core/src/config.rs`), so the PR appears conflict-free, but `cargo test -p victory-core --locked` fails on two tests that were added on `main` after the branch point: - `config::tests::empty_test_titles_env_is_ignored` - `config::tests::test_titles_env_splits_paths` Both panic at `Config::resolve(file, None, env).unwrap()` with: ```text cannot determine a user directory; set VICTORY_CACHE_DIR and VICTORY_DATA_DIR ``` Because `default_cache_dir` / `default_data_dir` now read `LOCALAPPDATA`/`HOME` through the injected `env` closure, those two tests also need `"HOME"` (or `"LOCALAPPDATA"`) in their mock `env`, just like `environment_overrides_file` and `empty_env_values_are_ignored`. ### 2. Empty-string env fallback bug in `default_cache_dir` / `default_data_dir` In both helpers: ```rust let base = env("LOCALAPPDATA") .or_else(|| env("XDG_CACHE_HOME")) .filter(|v| !v.is_empty()) .map(PathBuf::from) .or_else(|| env("HOME").map(|h| PathBuf::from(h).join(".cache"))) ``` - Because `.filter(|v| !v.is_empty())` is applied **after** `.or_else(...)`, if `LOCALAPPDATA=""` and `XDG_CACHE_HOME` (or `XDG_DATA_HOME`) is set, `Some("")` short-circuits `.or_else(...)` and is then filtered to `None`, skipping the XDG variable entirely. Filtering each `env(...)` lookup individually (e.g., via a small `non_empty` helper) avoids this. - Likewise, `env("HOME")` is not filtered for emptiness, so `HOME=""` resolves to relative `.cache/victory/cache` and `.local/share/victory/data` inside the current working directory. *(Note: on the PR head alone before merging `main`, `victory-core` tests and `cargo xtask policy` pass; the pre-existing `victory-hle` clippy warning on `xmem.rs` is already fixed on `main`.)* AI-assisted; synthetic tests only, no game files.
Author
Owner

@⁠Altorru on GitHub · 2026-11-24 09:59 UTC · original

Review note: the new LOCALAPPDATA.or_else(XDG_*).filter(non-empty) chain checks LOCALAPPDATA before XDG. A set-but-empty LOCALAPPDATA therefore prevents an otherwise valid XDG_CACHE_HOME/XDG_DATA_HOME fallback and silently sends the defaults to $HOME. On Unix, gate LOCALAPPDATA on cfg!(windows) (or filter it before or_else), and add cases for non-empty XDG_DATA_HOME and empty LOCALAPPDATA. The cache/data separation itself is the right direction.

**@⁠Altorru** on GitHub · 2026-11-24 09:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7128168582) Review note: the new `LOCALAPPDATA.or_else(XDG_*).filter(non-empty)` chain checks `LOCALAPPDATA` before XDG. A set-but-empty `LOCALAPPDATA` therefore prevents an otherwise valid `XDG_CACHE_HOME`/`XDG_DATA_HOME` fallback and silently sends the defaults to `$HOME`. On Unix, gate `LOCALAPPDATA` on `cfg!(windows)` (or filter it before `or_else`), and add cases for non-empty `XDG_DATA_HOME` and empty `LOCALAPPDATA`. The cache/data separation itself is the right direction.
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 10:16 UTC · original

Two tests fail on current main@ffe310e with this PR applied clean:

cargo test --workspace        # stops at the first failing target
test result: FAILED. 11 passed; 2 failed; 0 ignored

failures:
  config::tests::empty_test_titles_env_is_ignored
  config::tests::test_titles_env_splits_paths

thread '...empty_test_titles_env_is_ignored' panicked at crates\victory-core\src\config.rs:215:52:
  cannot determine a user directory; set VICTORY_CACHE_DIR and VICTORY_DATA_DIR

Both are the config tests that previously ran without a user directory; whatever the data-directory change does here now requires one, so the fixtures need VICTORY_CACHE_DIR/VICTORY_DATA_DIR set (or the fallback kept). The run stops there, so the rest of the workspace did not get to run.

On the same box, clean main@ffe310e is 342 passed, 0 failed, 6 ignored.

Environment: Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.98.1, MSVC 14.44.35207, debug build, log outside the tree so the asset-policy test is unaffected. AI-assisted (opencode).

**@⁠dcastell1** on GitHub · 2026-11-24 10:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7128552688) Two tests fail on current `main@ffe310e` with this PR applied clean: ``` cargo test --workspace # stops at the first failing target test result: FAILED. 11 passed; 2 failed; 0 ignored failures: config::tests::empty_test_titles_env_is_ignored config::tests::test_titles_env_splits_paths thread '...empty_test_titles_env_is_ignored' panicked at crates\victory-core\src\config.rs:215:52: cannot determine a user directory; set VICTORY_CACHE_DIR and VICTORY_DATA_DIR ``` Both are the config tests that previously ran without a user directory; whatever the data-directory change does here now requires one, so the fixtures need `VICTORY_CACHE_DIR`/`VICTORY_DATA_DIR` set (or the fallback kept). The run stops there, so the rest of the workspace did not get to run. On the same box, clean `main@ffe310e` is **342 passed, 0 failed, 6 ignored**. Environment: Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.98.1, MSVC 14.44.35207, debug build, log outside the tree so the asset-policy test is unaffected. AI-assisted (opencode).
Author
Owner

@⁠ErRusso on GitHub · 2026-11-24 11:19 UTC · original

Audit: ✅ Looks good — verified & tested

Reviewed this PR as part of an audit of mergeable PRs. Findings:

  • Scope: crates/victory-core/src/config.rs (+50/-10). Splits the old default_dir() into default_cache_dir() (XDG cache / %LOCALAPPDATA%) and default_data_dir() (XDG data / ~/.local/share / %LOCALAPPDATA%), so the data dir is never under the cache root on any platform.
  • Merges cleanly into main (verified with git merge-tree).
  • Tests: cargo test -p victory-core → 9/9 passed, including the new data_dir_not_under_cache_without_localappdata.
  • Refactor quality: The env closure parameter makes the default-dir selection testable; existing tests were updated consistently. Good comment explaining the XDG_DATA_HOME default.

No issues found. Nice catch separating cache from data.

**@⁠ErRusso** on GitHub · 2026-11-24 11:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7129946176) ## Audit: ✅ Looks good — verified & tested Reviewed this PR as part of an audit of mergeable PRs. Findings: - **Scope:** `crates/victory-core/src/config.rs` (+50/-10). Splits the old `default_dir()` into `default_cache_dir()` (XDG cache / `%LOCALAPPDATA%`) and `default_data_dir()` (XDG data / `~/.local/share` / `%LOCALAPPDATA%`), so the data dir is **never under the cache root** on any platform. - **Merges cleanly** into `main` (verified with `git merge-tree`). - **Tests:** `cargo test -p victory-core` → **9/9 passed**, including the new `data_dir_not_under_cache_without_localappdata`. - **Refactor quality:** The `env` closure parameter makes the default-dir selection testable; existing tests were updated consistently. Good comment explaining the XDG_DATA_HOME default. No issues found. Nice catch separating cache from data.
Author
Owner

@⁠Loggerten on GitHub · 2026-11-24 11:24 UTC · original

Pushed a9698e7, rebased onto ffe310e with the review fixes. It is a single commit on top of main, so the diff is still crates/victory-core/src/config.rs alone.

1. The two config tests (catminou4, geiyiliyabumo, dcastell1). Reproduced here: 99f12d9 merged with ffe310e gives 10 passed, 2 failed. Both mock closures hid HOME, so resolve() errored on the new defaults. They now get "HOME" => Some("/tmp/probe-home"), as environment_overrides_file and empty_env_values_are_ignored already did. 15/15 pass now.

2. Empty env values (geiyiliyabumo, Altorru, mercuryVM). Correct, and slightly worse than reported. The old chain also let an empty HOME through, which resolved to a relative .cache/victory/cache. There is now an env_dir helper that filters each variable before the or_else chain, and resolve uses the same helper for the VICTORY_* variables. New tests: empty_localappdata_falls_back_to_xdg, xdg_home_without_home, empty_home_is_not_a_relative_path.

3. Gating LOCALAPPDATA on cfg!(windows) (Altorru). Not doing that in this PR. Main's default_dir already preferred LOCALAPPDATA over XDG_CACHE_HOME on every platform, so that ordering predates this change. Gating it would change behaviour for Unix hosts that export LOCALAPPDATA, so it wants its own issue and its own test. The empty-value bug you named in the same paragraph is fixed.

4. Migration (mercuryVM). Confirmed, and recorded in the commit message: saves under <cache>/victory/data are not moved. VICTORY_DATA_DIR keeps a user on the old path. Autodetecting the old directory at startup is a bigger change than this PR, but say if you want it.

Verified here: cargo test -p victory-core 15 passed, cargo clippy -p victory-core --all-targets -- -D warnings clean, cargo xtask policy 154 files ok. I could not run cargo test --workspace: victory-gpu does not build on Linux on main either (host_resource missing at crates/victory-gpu/src/resource.rs:284), so the workspace run has to come from the Windows CI job.

**@⁠Loggerten** on GitHub · 2026-11-24 11:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7130050577) Pushed `a9698e7`, rebased onto `ffe310e` with the review fixes. It is a single commit on top of main, so the diff is still `crates/victory-core/src/config.rs` alone. **1. The two config tests (catminou4, geiyiliyabumo, dcastell1).** Reproduced here: `99f12d9` merged with `ffe310e` gives 10 passed, 2 failed. Both mock closures hid `HOME`, so `resolve()` errored on the new defaults. They now get `"HOME" => Some("/tmp/probe-home")`, as `environment_overrides_file` and `empty_env_values_are_ignored` already did. 15/15 pass now. **2. Empty env values (geiyiliyabumo, Altorru, mercuryVM).** Correct, and slightly worse than reported. The old chain also let an empty `HOME` through, which resolved to a relative `.cache/victory/cache`. There is now an `env_dir` helper that filters each variable before the `or_else` chain, and `resolve` uses the same helper for the `VICTORY_*` variables. New tests: `empty_localappdata_falls_back_to_xdg`, `xdg_home_without_home`, `empty_home_is_not_a_relative_path`. **3. Gating LOCALAPPDATA on `cfg!(windows)` (Altorru).** Not doing that in this PR. Main's `default_dir` already preferred `LOCALAPPDATA` over `XDG_CACHE_HOME` on every platform, so that ordering predates this change. Gating it would change behaviour for Unix hosts that export `LOCALAPPDATA`, so it wants its own issue and its own test. The empty-value bug you named in the same paragraph is fixed. **4. Migration (mercuryVM).** Confirmed, and recorded in the commit message: saves under `<cache>/victory/data` are not moved. `VICTORY_DATA_DIR` keeps a user on the old path. Autodetecting the old directory at startup is a bigger change than this PR, but say if you want it. Verified here: `cargo test -p victory-core` 15 passed, `cargo clippy -p victory-core --all-targets -- -D warnings` clean, `cargo xtask policy` 154 files ok. I could not run `cargo test --workspace`: `victory-gpu` does not build on Linux on main either (`host_resource` missing at `crates/victory-gpu/src/resource.rs:284`), so the workspace run has to come from the Windows CI job.
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 11:38 UTC · original

Follow-up on the current head a9698e74 (based on ffe310e): the two failures are gone.

clean main@ffe310e            : 342 passed; 0 failed; 6 ignored
this PR at a9698e74 on it     : 346 passed; 0 failed; 6 ignored   (exit 0)

empty_test_titles_env_is_ignored and test_titles_env_splits_paths no longer hit cannot determine a user directory, so the rebase fixed what my earlier comment reported against 99f12d90/d2a4bae. Four more passing tests than main here, nothing else changes verdict.

Environment: Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.98.1, MSVC 14.44.35207, debug, log outside the tree. AI-assisted (opencode).

**@⁠dcastell1** on GitHub · 2026-11-24 11:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7130350390) Follow-up on the current head `a9698e74` (based on `ffe310e`): the two failures are gone. ``` clean main@ffe310e : 342 passed; 0 failed; 6 ignored this PR at a9698e74 on it : 346 passed; 0 failed; 6 ignored (exit 0) ``` `empty_test_titles_env_is_ignored` and `test_titles_env_splits_paths` no longer hit `cannot determine a user directory`, so the rebase fixed what my earlier comment reported against `99f12d90`/`d2a4bae`. Four more passing tests than main here, nothing else changes verdict. Environment: Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.98.1, MSVC 14.44.35207, debug, log outside the tree. AI-assisted (opencode).
Author
Owner

@⁠molodayamama on GitHub · 2026-11-24 13:58 UTC · original

Independent synthetic Windows check of a9698e7488 (Windows 10 22H2, Rust 1.98.1, MSVC x64).

cargo test -p victory-core --locked --lib config::tests -- --test-threads=1 --nocapture passed 11 configuration tests. The changed cases covered cache/data directory separation when LOCALAPPDATA is absent, empty LOCALAPPDATA, XDG_DATA_HOME with HOME missing, and rejection of an empty home instead of a relative path.

No game files or GPU needed. AI-assisted verification.

**@⁠molodayamama** on GitHub · 2026-11-24 13:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7133640209) Independent synthetic Windows check of a9698e7488ab2a7d1bdbf0e6b736ab689b6b2ca2 (Windows 10 22H2, Rust 1.98.1, MSVC x64). cargo test -p victory-core --locked --lib config::tests -- --test-threads=1 --nocapture passed 11 configuration tests. The changed cases covered cache/data directory separation when LOCALAPPDATA is absent, empty LOCALAPPDATA, XDG_DATA_HOME with HOME missing, and rejection of an empty home instead of a relative path. No game files or GPU needed. AI-assisted verification.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:28 UTC · original

Automated triage for the maintainers.

Proposed close. The PR splits default_dir in crates/victory-core/src/config.rs into default_cache_dir and default_data_dir, so that hosts without LOCALAPPDATA put data under XDG_DATA_HOME or ~/.local/share. It is careful work, and the review fixes (empty values, test fixtures) are correct.

It doesn't change anything on a host VIctory supports, though. VIctory runs only on Windows (README: "Requirements: Windows 10/11 x64"). There LOCALAPPDATA is always set, and the defaults are already the siblings %LOCALAPPDATA%\victory\cache and %LOCALAPPDATA%\victory\data, so data is not under the cache root. The new paths only apply where victory-gpu and victory-hle don't build, as the PR itself notes. Making the program usable on non-Windows hosts is out of scope. The PR also moves the default for anyone who relied on the old path, with no migration.

If a maintainer wants the XDG defaults anyway, removing the label keeps this open.

CI: no check runs on the head commit.

This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the triage: proposed close label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/708#issuecomment-7149596002) <!-- victory-triage v1 head=a9698e7488ab2a7d1bdbf0e6b736ab689b6b2ca2 verdict=proposed-close at=2026-11-25T01:28:56Z --> Automated triage for the maintainers. **Proposed close.** The PR splits `default_dir` in `crates/victory-core/src/config.rs` into `default_cache_dir` and `default_data_dir`, so that hosts without `LOCALAPPDATA` put data under `XDG_DATA_HOME` or `~/.local/share`. It is careful work, and the review fixes (empty values, test fixtures) are correct. It doesn't change anything on a host VIctory supports, though. VIctory runs only on Windows (README: "Requirements: Windows 10/11 x64"). There `LOCALAPPDATA` is always set, and the defaults are already the siblings `%LOCALAPPDATA%\victory\cache` and `%LOCALAPPDATA%\victory\data`, so data is not under the cache root. The new paths only apply where `victory-gpu` and `victory-hle` don't build, as the PR itself notes. Making the program usable on non-Windows hosts is out of scope. The PR also moves the default for anyone who relied on the old path, with no migration. If a maintainer wants the XDG defaults anyway, removing the label keeps this open. CI: no check runs on the head commit. This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the `triage: proposed close` label. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/708/head:github-bot/gh-708'
git switch 'github-bot/gh-708'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-708'
git switch 'github-bot/gh-708'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-708'
git switch 'github-bot/gh-708'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-708'
git switch 'main'
git merge --squash 'github-bot/gh-708'
git switch 'main'
git merge --ff-only 'github-bot/gh-708'
git switch 'main'
git merge 'github-bot/gh-708'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!708
No description provided.