Skip to content

Commit 6074574

Browse files
authored
Merge pull request #357 from davidgiven/dtrg-ab
Update ab.
2 parents a219541 + 33da4c5 commit 6074574

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

build/utils.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ def collectattrs(*, targets, name, initial=[]):
4040

4141
@functools.cache
4242
def _glob_to_re(glob_str):
43+
if glob_str.startswith("./"):
44+
glob_str = normpath(join(getcwd(), glob_str))
45+
4346
opts = re.compile("([.]|[*][*]/|[*]|[?])|(.)")
4447
out = ""
4548
for pattern_match, literal_text in opts.findall(glob_str):
@@ -80,15 +83,15 @@ def iterate():
8083
for dirpath, dirnames, filenames in walk(
8184
dir, topdown=True, followlinks=True
8285
):
83-
dirpath = relpath(dirpath, dir)
86+
dirpath = relpath(dirpath, relative_to)
8487
filenames = [normpath(join(dirpath, f)) for f in filenames]
8588
matching = set()
8689
for p in include:
87-
matching.update(_glob_filter(filenames, p))
90+
matching.update([f for f in _glob_filter(filenames, p)])
8891
for p in exclude:
8992
matching = [n for n in matching if not _glob_matches(n, p)]
9093
for f in matching:
91-
yield normpath(relpath(join(dir, f), relative_to))
94+
yield f
9295

9396
return list(iterate())
9497

compile_commands.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)