Ignore parse errors of preferences file.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2613.
This commit is contained in:
Dan Albert 2023-05-01 23:19:59 -07:00
parent b4c02767ac
commit 76e6aff9d7
2 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,7 @@ Saves from 6.x are not compatible with 7.0.
## Fixes ## Fixes
* **[Campaign]** Fixed a longstanding bug where oversized airlifts could corrupt a save with empty convoys. * **[Campaign]** Fixed a longstanding bug where oversized airlifts could corrupt a save with empty convoys.
* **[Engine]** Fixed crash in startup caused by a corrupted Liberation preferences file.
* **[Modding]** Fixed an issue where Falklands campaigns created or edited with new versions of DCS could not be loaded. * **[Modding]** Fixed an issue where Falklands campaigns created or edited with new versions of DCS could not be loaded.
* **[Modding]** Fixed decoding of campaign yaml files to use UTF-8 rather than the system locale's default. It's now possible to use "Bf 109 K-4 Kurfürst" as a preferred aircraft type. * **[Modding]** Fixed decoding of campaign yaml files to use UTF-8 rather than the system locale's default. It's now possible to use "Bf 109 K-4 Kurfürst" as a preferred aircraft type.
* **[Mission Generation]** Planes will no longer spawn in helipads that are not also designated for fixed wing parking. * **[Mission Generation]** Planes will no longer spawn in helipads that are not also designated for fixed wing parking.

View File

@ -36,7 +36,9 @@ def init():
"ignore_empty_install_directory", False "ignore_empty_install_directory", False
) )
is_first_start = False is_first_start = False
except KeyError: except (KeyError, ValueError):
# KeyError in case of missing contents, ValueError in case of decoding
# errors from a corrupted file.
__dcs_saved_game_directory = "" __dcs_saved_game_directory = ""
__dcs_installation_directory = "" __dcs_installation_directory = ""
__last_save_file = "" __last_save_file = ""