From f9f10f9b9e611a8e0fdec22b992614492e4f3bae Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 14 Jul 2026 14:49:04 +0200 Subject: [PATCH] Config: Fix search_dirs env var parsing into dirs When search_dirs comes from an environment variable, the __load() method iterates over each character of the colon-separated string instead of treating it as a list of directory paths. This produces nonsensical glob paths like "h/", "o/", "m/", etc. Fix by splitting the env var value into a list before assigning it to the search_dirs variable. Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v Signed-off-by: Jan Lindemann --- src/python/jw/util/Config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/python/jw/util/Config.py b/src/python/jw/util/Config.py index fbabfe1..5ec6352 100644 --- a/src/python/jw/util/Config.py +++ b/src/python/jw/util/Config.py @@ -31,7 +31,9 @@ class Config(): # export glob_paths = [glob_paths] if search_dirs is None: env_key = re.sub('[-.]', '_', exe) - search_dirs = os.getenv(env_key) + env_val = os.getenv(env_key) + if env_val is not None: + search_dirs = env_val.split(':') for path in glob_paths: dirs = search_dirs if dirs is None: