diff --git a/backend/src/config/api_settings.py b/backend/src/config/api_settings.py index 4109e29..5551acf 100644 --- a/backend/src/config/api_settings.py +++ b/backend/src/config/api_settings.py @@ -1,5 +1,7 @@ # pylint: disable=too-few-public-methods import os +import __main__ + class DefaultSettings: API_TITLE = "Support Organizer" API_VERSION = 0.1 @@ -25,4 +27,4 @@ class DefaultSettings: } } - FILE_SAVE_DIRECTORY = f"{os.getcwd()}/temp" + FILE_SAVE_DIRECTORY = f"{os.path.dirname(__main__.__file__)}/temp" diff --git a/backend/src/config/db_settings.py b/backend/src/config/db_settings.py index 3c85ce0..52a3a44 100644 --- a/backend/src/config/db_settings.py +++ b/backend/src/config/db_settings.py @@ -1,5 +1,6 @@ # pylint: disable=too-few-public-methods import os +import __main__ class DatabaseSettings: - DATABASE_DIRECTORY = f"{os.getcwd()}/database/storage" + DATABASE_DIRECTORY = f"{os.path.dirname(__main__.__file__)}/database/storage"