* [PATCH] mailsplit: remove unnecessary unlink(2) call
@ 2014-10-04 8:41 René Scharfe
0 siblings, 0 replies; only message in thread
From: René Scharfe @ 2014-10-04 8:41 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano, Stefan Beller, Jeff King
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>
---
Original thread: http://thread.gmane.org/gmane.comp.version-control.git/255140
builtin/mailsplit.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 763cda0..8e02ea1 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -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);
}
--
2.1.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-04 8:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-04 8:41 [PATCH] mailsplit: remove unnecessary unlink(2) call René Scharfe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).