From 7cf5a5137ed2cf62db73822865c3a2bf8adf8ea0 Mon Sep 17 00:00:00 2001
From: Christoph Stahl <christoph.stahl@uni-dortmund.de>
Date: Wed, 20 Dec 2023 18:59:54 +0100
Subject: [PATCH] Allow for an already existing config dir

---
 syng/gui.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/syng/gui.py b/syng/gui.py
index 425ccc7..3aaa564 100644
--- a/syng/gui.py
+++ b/syng/gui.py
@@ -411,7 +411,7 @@ class SyngGui(customtkinter.CTk):  # type:ignore
         self.update_qr()
 
     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:
             dump(self.gather_config(), f, Dumper=Dumper)
-- 
GitLab