core: show data_dir in config and check its asset policy

'victory config' displays game_dir, cache_dir, and test_titles, but omitted data_dir (where saves, persistent local storage, and crashes.log are stored). It also omitted data_dir from the runtime asset-policy check loop in show_config().

Include data_dir in the output and policy check, and add a unit test in victory-core asserting that a data_dir inside the repository is refused.
This commit is contained in:
Advait Palve committed 2026-11-24 10:56:10 +05:30
1 parent d2a4bae1f4
commit 9a8908c378
2 files changed
+12 -1

No files matched your search

+10
View File
@@ -181,4 +181,14 @@ mod tests {
};
assert!(cfg.cache_subdir("x").is_err());
}
#[test]
fn data_inside_repo_is_refused() {
let inside = Path::new(env!("CARGO_MANIFEST_DIR")).join("data");
let cfg = Config {
data_dir: inside,
..Default::default()
};
assert!(cfg.data_subdir("x").is_err());
}
}