This commit is contained in:
2025-11-08 17:27:01 +01:00
parent ade0c3fbc4
commit 6845a7d6fe
5 changed files with 120 additions and 6 deletions
@@ -160,6 +160,21 @@ fn set_game_install_state_from_path(game_db: &mut GameDB, path: &Path, installed
log::debug!("Set {game} to uninstalled");
}
game.installed = installed;
// Read local version.ini if installed
if installed {
if let Ok(version) = lanspread_db::db::read_version_from_ini(path) {
game.local_version = version;
if let Some(ref version) = game.local_version {
log::debug!("Read local version for game {}: {}", game.id, version);
}
} else {
log::warn!("Failed to read local version.ini for game: {}", game.id);
}
} else {
// Clear local version when uninstalled
game.local_version = None;
}
}
}