fix: Simplify file matching logic in commands.py

This commit is contained in:
Paul Gauthier 2024-08-22 16:51:50 -07:00 committed by Paul Gauthier (aider)
parent 9570d71b13
commit 9584a7f296

View file

@ -1037,8 +1037,6 @@ 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]