Skip to content

Commit 39d63d7

Browse files
committed
Resolve recursion error
1 parent 82e3c85 commit 39d63d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django_esm/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def get_static_from_abs_path(mod: str, path: Path, location: Path):
4545
pass
4646
else:
4747
if "*" in mod:
48-
for match in location.rglob(str(rel_path).replace("*", "**/*")):
48+
for match in location.glob(str(rel_path).replace("*", "**/*")):
49+
if match.is_dir():
50+
continue
4951
sp = str(match.relative_to(location.resolve()))
5052
pattern = re.escape(str(rel_path)).replace(r"\*", r"(.*)")
5153
bit = re.match(pattern, sp).group(1)

0 commit comments

Comments
 (0)