Merge PR #214: fix: align _apply_delete comment with actual behavior
Authored by VolodymyrBg.
This commit is contained in:
commit
8e901b31c1
@ -324,8 +324,7 @@ def _apply_delete(op: PatchOperation, file_ops: Any) -> Tuple[bool, str]:
|
|||||||
# File doesn't exist, nothing to delete
|
# File doesn't exist, nothing to delete
|
||||||
return True, f"# {op.file_path} already deleted or doesn't exist"
|
return True, f"# {op.file_path} already deleted or doesn't exist"
|
||||||
|
|
||||||
# Delete by writing empty and then removing
|
# Delete directly via shell command using the underlying environment
|
||||||
# Use shell command via the underlying environment
|
|
||||||
rm_result = file_ops._exec(f"rm -f {file_ops._escape_shell_arg(op.file_path)}")
|
rm_result = file_ops._exec(f"rm -f {file_ops._escape_shell_arg(op.file_path)}")
|
||||||
|
|
||||||
if rm_result.exit_code != 0:
|
if rm_result.exit_code != 0:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user