Add logic for creating new savefile from legacy savefile if new one isn't present

This commit is contained in:
user 2024-06-21 11:31:11 +02:00
parent db371d8d8f
commit e13f87f81f

View file

@ -547,7 +547,12 @@ impl ApiMessageHandler {
} else {
// A savefile in the current format doesn't exist yet.
// TODO: Parse it to the new format and save it.
let app_id_from_game_id: u64;
let new_path = format!("{app_id_from_game_id}.ron");
let migrated_settings: crate::persist::FileJson = legacy_file.into();
migrated_settings.save(new_path);
}
} else if current_settings.is_some() {
// ...