From 9584a7f296588f3e867988368a262f8a515a7ec3 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 22 Aug 2024 16:51:50 -0700 Subject: [PATCH] fix: Simplify file matching logic in commands.py --- aider/commands.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 5df464d89..6e8beed7f 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1037,14 +1037,12 @@ class Commands: filenames = parse_quoted_filenames(args) for word in filenames: - matched_files = self.glob_filtered_to_repo(word) - if not matched_files: - # If no files matched, try to use the word as a direct file path - if os.path.exists(word) and os.path.isfile(word): - matched_files = [word] - else: - self.io.tool_error(f"No files matched '{word}'.") - continue + # If no files matched, try to use the word as a direct file path + if os.path.exists(word) and os.path.isfile(word): + matched_files = [word] + else: + self.io.tool_error(f"No files matched '{word}'.") + continue for matched_file in matched_files: abs_path = self.coder.abs_root_path(matched_file)