mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fixes #1297
This commit is contained in:
parent
7db3ca50e8
commit
fcf83cb9ee
1 changed files with 5 additions and 2 deletions
|
@ -559,14 +559,17 @@ class Commands:
|
|||
return files
|
||||
|
||||
def glob_filtered_to_repo(self, pattern):
|
||||
if not pattern:
|
||||
if not pattern.strip():
|
||||
return []
|
||||
try:
|
||||
if os.path.isabs(pattern):
|
||||
# Handle absolute paths
|
||||
raw_matched_files = [Path(pattern)]
|
||||
else:
|
||||
raw_matched_files = list(Path(self.coder.root).glob(pattern))
|
||||
try:
|
||||
raw_matched_files = list(Path(self.coder.root).glob(pattern))
|
||||
except IndexError:
|
||||
raw_matched_files = []
|
||||
except ValueError as err:
|
||||
self.io.tool_error(f"Error matching {pattern}: {err}")
|
||||
raw_matched_files = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue