From ca14ecea7614fca5c304c07b7bf7daa5caebc830 Mon Sep 17 00:00:00 2001 From: sroth Date: Tue, 22 Apr 2025 01:27:53 +0200 Subject: [PATCH] moved config.ini into ~/.config/brovski-adress-etiketten --- src/config.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/config.py b/src/config.py index 008aa47..56a05f0 100644 --- a/src/config.py +++ b/src/config.py @@ -15,9 +15,11 @@ class Config: """ self.parser = ConfigParser() - self.config_file_name = "config.ini" - self.root_path = os.path.dirname(os.path.abspath(__file__)) - self.config_file = os.path.join(self.root_path, self.config_file_name) + home_path = os.environ["HOME"] + full_path = os.path.join(home_path, ".config", "brovski-adress-etiketten" ) + if not os.path.exists(full_path): + os.makedirs(full_path) + self.config_file = os.path.join(full_path, "config.ini") self._load()