No longer create an empty config in the user configs folder

This commit is contained in:
rlaphoenix 2024-01-24 18:39:36 +00:00
parent de7122a179
commit 21687e6649
1 changed files with 4 additions and 4 deletions

View File

@ -78,9 +78,9 @@ class Config:
# noinspection PyProtectedMember # noinspection PyProtectedMember
config_path = Config._Directories.user_configs / Config._Filenames.root_config config_path = Config._Directories.user_configs / Config._Filenames.root_config
if not config_path.is_file(): if config_path.exists():
Config._Directories.user_configs.mkdir(parents=True, exist_ok=True) config = Config.from_yaml(config_path)
config_path.write_text("") else:
config = Config.from_yaml(config_path) config = Config()
__all__ = ("config",) __all__ = ("config",)