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 <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>
René Scharfe committed
Oct 4, 2014 at 10:41 UTC
db7879438f0a3d7607555cf166b42ed1083272b6
1 file changed
-1
builtin/mailsplit.c
-1
@@ -59,7 +59,6 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)
59
int is_bare = !is_from_line(buf.buf, buf.len);
60
61
if (is_bare && !allow_bare) {
62
- unlink(name);
62
fprintf(stderr, "corrupt mailbox\n");
63
exit(1);
64
}