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:
kingbri 2023-12-23 23:57:33 -05:00
parent 703a114f63
commit 060d422e03

View file

@ -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(