wip
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user