mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-20 14:28:54 +00:00
Config: Resolve filepath
This maps the absolute path when loading the config file. Making things safer when loading and finding the correct path. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -14,7 +14,7 @@ def read_config_from_file(config_path: pathlib.Path):
|
||||
global GLOBAL_CONFIG
|
||||
|
||||
try:
|
||||
with open(str(config_path), "r", encoding="utf8") as config_file:
|
||||
with open(str(config_path.resolve()), "r", encoding="utf8") as config_file:
|
||||
GLOBAL_CONFIG = unwrap(yaml.safe_load(config_file), {})
|
||||
except Exception as exc:
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user