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 <jan@janware.com>
This commit is contained in:
parent
df5202f4dc
commit
f9f10f9b9e
1 changed files with 3 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue