Skip to content

Commit db78794

Browse files
rscharfegitster
authored andcommitted
mailsplit: remove unnecessary unlink(2) call
The output file hasn't been created at this point, yet, so there is no need to delete it when exiting early. Suggested-by: Jeff King <[email protected]> Signed-off-by: Rene Scharfe <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 13b0812 commit db78794

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

builtin/mailsplit.c

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)
5959
int is_bare = !is_from_line(buf.buf, buf.len);
6060

6161
if (is_bare && !allow_bare) {
62-
unlink(name);
6362
fprintf(stderr, "corrupt mailbox\n");
6463
exit(1);
6564
}

0 commit comments

Comments
 (0)