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:
1 parent
35e8407c9c
commit
d8177c18d5
2 files changed
+12
-1
No files matched your search
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user