Skip to content

Commit 1f53401

Browse files
fix broken test in Python 3.13
Python 3.13 changed the behavior of trailing `**` globs, which changed the behavior of `ls(..., select='.../**')`. This commit preserves the previous behavior. Fixes KenKundert#4
1 parent 69f6db6 commit 1f53401

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shlib/shlib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ def acceptable(path):
382382
return True
383383

384384
select = to_str(select)
385+
if select.endswith("**"):
386+
# Add trailing slash to match only directories. See #4.
387+
select += "/"
385388
retain_hidden = select.startswith(".") if hidden is None else hidden
386389
paths = paths if paths else ["."]
387390
for path in to_paths(paths):

0 commit comments

Comments
 (0)