feat(database): Added database corruption dialog

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-01-04 22:29:24 +11:00
parent 32ae7d5385
commit 25ba200a5e
4 changed files with 16 additions and 21 deletions

View File

@ -251,10 +251,11 @@ fn handle_invalid_database(_e: RustbreakError, db_path: PathBuf, games_base_dir:
let new_path = {
let time = Utc::now().timestamp();
let mut base = db_path.clone().into_os_string();
base.push(".");
base.push(time.to_string());
base
};
fs::copy(&db_path, &new_path);
fs::copy(&db_path, &new_path).unwrap();
let db = Database {
auth: None,