mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
fix: Handle file reading with encoding, ignore decoding errors
This commit is contained in:
parent
44b1acd385
commit
dd857aeccf
1 changed files with 1 additions and 0 deletions
|
@ -368,6 +368,7 @@ class InputOutput:
|
|||
return self.read_image(filename)
|
||||
|
||||
try:
|
||||
# ignore decoding errors. ai!
|
||||
with open(str(filename), "r", encoding=self.encoding) as f:
|
||||
return f.read()
|
||||
except FileNotFoundError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue