From 060d422e03dba44bb66f3be2ce12220de9bf27aa Mon Sep 17 00:00:00 2001 From: kingbri Date: Sat, 23 Dec 2023 23:57:33 -0500 Subject: [PATCH] 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 --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 93b7ea0..e65edfa 100644 --- a/config.py +++ b/config.py @@ -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(