diff --git a/xbout/load.py b/xbout/load.py index 5bd83dd3..acc55872 100644 --- a/xbout/load.py +++ b/xbout/load.py @@ -789,12 +789,14 @@ def _expand_wildcards(path): # Find first parent directory which does not contain a wildcard base_dir = path while True: - base_dir = str(base_dir.parent) - if "*" in base_dir: + _base_dir = str(base_dir.parent) + base_dir = Path(_base_dir) + if "*" in _base_dir: continue - if "{" in base_dir: + if "{" in _base_dir: + continue + if "[" in _base_dir: continue - base_dir = Path(base_dir) break # Find path relative to parent search_pattern = str(path.relative_to(base_dir))