mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Fix: Correct rename detection in apply_patch to check per-diff instead of full patch (#10913)
Signed-off-by: Bogdan Petkovic <bogdan@fatdragon.dev> Co-authored-by: Bogdan Petkovic <bogdan@fatdragon.dev>
This commit is contained in:
parent
2bbe15a329
commit
399bf92ed1
@ -59,7 +59,7 @@ def apply_patch(repo_dir: str, patch: str) -> None:
|
||||
continue
|
||||
|
||||
# Handle file rename
|
||||
if old_path and new_path and 'rename from' in patch:
|
||||
if old_path and new_path and 'rename from' in diff.text:
|
||||
# Create parent directory of new path
|
||||
os.makedirs(os.path.dirname(new_path), exist_ok=True)
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user