mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
Add the ability to add images that are located outside the git repo #519
This commit is contained in:
parent
c2b8b2355d
commit
a84b4f8144
2 changed files with 5 additions and 2 deletions
|
@ -367,7 +367,7 @@ class Commands:
|
||||||
for matched_file in all_matched_files:
|
for matched_file in all_matched_files:
|
||||||
abs_file_path = self.coder.abs_root_path(matched_file)
|
abs_file_path = self.coder.abs_root_path(matched_file)
|
||||||
|
|
||||||
if not abs_file_path.startswith(self.coder.root):
|
if not abs_file_path.startswith(self.coder.root) and not is_image_file(matched_file):
|
||||||
self.io.tool_error(
|
self.io.tool_error(
|
||||||
f"Can not add {abs_file_path}, which is not within {self.coder.root}"
|
f"Can not add {abs_file_path}, which is not within {self.coder.root}"
|
||||||
)
|
)
|
||||||
|
|
|
@ -215,7 +215,10 @@ class GitRepo:
|
||||||
if not self.aider_ignore_file or not self.aider_ignore_file.is_file():
|
if not self.aider_ignore_file or not self.aider_ignore_file.is_file():
|
||||||
return
|
return
|
||||||
|
|
||||||
fname = self.normalize_path(fname)
|
try:
|
||||||
|
fname = self.normalize_path(fname)
|
||||||
|
except ValueError:
|
||||||
|
return
|
||||||
|
|
||||||
mtime = self.aider_ignore_file.stat().st_mtime
|
mtime = self.aider_ignore_file.stat().st_mtime
|
||||||
if mtime != self.aider_ignore_ts:
|
if mtime != self.aider_ignore_ts:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue