diff --git a/aider/commands.py b/aider/commands.py index 3694c59ee..01374dbe1 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -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: