fix: use Path.rglob instead of glob.glob for recursive file matching

This commit is contained in:
Paul Gauthier 2024-10-25 07:43:29 -07:00 committed by Paul Gauthier (aider)
parent fd820dbfe2
commit 5d3a60228c

View file

@ -1170,7 +1170,8 @@ class Commands:
# First collect all expanded paths
for pattern in filenames:
expanded_pattern = expanduser(pattern)
expanded_paths = glob.glob(expanded_pattern, recursive=True, root_dir=self.coder.root)
expanded_paths = Path(self.coder.root).rglob(expanded_pattern)
if not expanded_paths:
self.io.tool_error(f"No matches found for: {pattern}")
else: