Allow for an already existing config dir

This commit is contained in:
Christoph Stahl 2023-12-20 18:59:54 +01:00
parent 8440d756f5
commit 7cf5a5137e

View file

@ -411,7 +411,7 @@ class SyngGui(customtkinter.CTk): # type:ignore
self.update_qr() self.update_qr()
def save_config(self) -> None: def save_config(self) -> None:
os.makedirs(os.path.dirname(self.configfile)) os.makedirs(os.path.dirname(self.configfile), exist_ok=True)
with open(self.configfile, "w", encoding="utf-8") as f: with open(self.configfile, "w", encoding="utf-8") as f:
dump(self.gather_config(), f, Dumper=Dumper) dump(self.gather_config(), f, Dumper=Dumper)