diff --git a/src/briar/api/constants.py b/src/briar/api/constants.py index 94794a1ab75650b52e0a913f695160df0529d7ce..34dd83fbe76fc0c1e5125306cef1156304e9a251 100644 --- a/src/briar/api/constants.py +++ b/src/briar/api/constants.py @@ -6,13 +6,15 @@ from os.path import join from pathlib import Path from urllib.parse import urljoin -_BRIAR_DIR = ".briar" +_BRIAR_DIR_NAME = ".briar" +_HOME = str(Path.home()) +_BRIAR_DIR = join(_HOME, _BRIAR_DIR_NAME) _HOST = "%s://localhost:7000" _VERSION_SUFFIX = "v1/" -BRIAR_AUTH_TOKEN = join(Path.home(), _BRIAR_DIR, "auth_token") -BRIAR_DB = join(Path.home(), _BRIAR_DIR, "db", "db.mv.db") +BRIAR_AUTH_TOKEN = join(_BRIAR_DIR, "auth_token") +BRIAR_DB = join(_BRIAR_DIR, "db", "db.mv.db") BASE_HTTP_URL = urljoin(_HOST % "http", _VERSION_SUFFIX) WEBSOCKET_URL = urljoin(_HOST % "ws", "%s/ws" % _VERSION_SUFFIX)