Skip to content

Commit

Permalink
Fix base_dir detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwoerer committed Jan 8, 2024
1 parent 58fa552 commit 8bf6e89
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xbout/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 8bf6e89

Please sign in to comment.