check for required files

This commit is contained in:
2024-02-07 12:53:43 +01:00
parent 2760e2ab1e
commit e8aee89f45
2 changed files with 25 additions and 0 deletions

View File

@@ -300,6 +300,15 @@ async fn update(
))
.unwrap();
if !game.required_files_exist(dir) {
println!(
"{}\nVerify game file integrity on Steam or reinstall the game.",
"Critical game files missing.".bright_red()
);
std::io::stdin().read_line(&mut String::new()).unwrap();
std::process::exit(0);
}
let mut hashes = HashMap::new();
let hash_file = dir.join(".sha-sums");
if hash_file.exists() && !force {