mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: Strip b/ prefix when a path is /dev/null in diffs
This commit is contained in:
parent
303645cffa
commit
80515b69c1
1 changed files with 2 additions and 2 deletions
|
@ -348,8 +348,8 @@ def process_fenced_block(lines, start_line_num):
|
|||
a_fname = block[0][4:].strip()
|
||||
b_fname = block[1][4:].strip()
|
||||
|
||||
# Check if standard git diff prefixes are present and strip them
|
||||
if a_fname.startswith("a/") and b_fname.startswith("b/"):
|
||||
# Check if standard git diff prefixes are present (or /dev/null) and strip them
|
||||
if (a_fname.startswith("a/") or a_fname == "/dev/null") and b_fname.startswith("b/"):
|
||||
fname = b_fname[2:]
|
||||
else:
|
||||
# Otherwise, assume the path is as intended
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue