Skip to content

Commit

Permalink
mailsplit: remove unnecessary unlink(2) call
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Oct 7, 2014
1 parent 13b0812 commit db78794
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion builtin/mailsplit.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)
int is_bare = !is_from_line(buf.buf, buf.len);

if (is_bare && !allow_bare) {
unlink(name);
fprintf(stderr, "corrupt mailbox\n");
exit(1);
}
Expand Down

0 comments on commit db78794

Please sign in to comment.