Update _jsonConfig.py

This commit is contained in:
None 2025-02-15 15:30:54 +01:00 committed by GitHub
parent 93f50b7d89
commit 774dc9403f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ class ConfigManager:
- file_path (str, optional): The path to the configuration file. Default is 'config.json'.
"""
if getattr(sys, 'frozen', False):
base_path = Path(sys._MEIPASS)
base_path = os.path.join(".")
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
self.file_path = os.path.join(base_path, file_name)