fixed directory issues

This commit is contained in:
Firq 2023-10-02 12:48:42 +02:00
parent 74a72b9789
commit cf18cbdc4e
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,7 @@
# pylint: disable=too-few-public-methods # pylint: disable=too-few-public-methods
import os import os
import __main__
class DefaultSettings: class DefaultSettings:
API_TITLE = "Support Organizer" API_TITLE = "Support Organizer"
API_VERSION = 0.1 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"

View file

@ -1,5 +1,6 @@
# pylint: disable=too-few-public-methods # pylint: disable=too-few-public-methods
import os import os
import __main__
class DatabaseSettings: class DatabaseSettings:
DATABASE_DIRECTORY = f"{os.getcwd()}/database/storage" DATABASE_DIRECTORY = f"{os.path.dirname(__main__.__file__)}/database/storage"