Index: editors/patch.c =================================================================== --- editors/patch.c (revision 18333) +++ editors/patch.c (working copy) @@ -263,7 +263,8 @@ if (unlink(new_filename) == -1) { bb_perror_msg_and_die("cannot remove file %s", new_filename); } - if (unlink(original_filename) == -1) { + if (strcmp(new_filename, original_filename) + && (unlink(original_filename) == -1)) { bb_perror_msg_and_die("cannot remove original file %s", new_filename); } }