diff --git a/CHANGELOG.md b/CHANGELOG.md index 078e46b4..59405a26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Add category filtering dialog for game library (thanks to orende) - Parallelize api.can_connect function with threads, futures (thanks to orende) - Fix available disk space being checked in parent directory (thanks to Unrud) +- Create new config if reading it fails **1.2.2** - Fix progress bar not showing up for downloads diff --git a/minigalaxy/config.py b/minigalaxy/config.py index 876b47ad..7512b3de 100644 --- a/minigalaxy/config.py +++ b/minigalaxy/config.py @@ -21,7 +21,7 @@ def __load(self) -> None: with open(self.__config_file, "r") as file: try: self.__config = json.loads(file.read()) - except json.decoder.JSONDecodeError: + except (json.decoder.JSONDecodeError, UnicodeDecodeError): logger.warn("Reading config.json failed, creating new config file.") os.remove(self.__config_file)