diff options
author | Junio C Hamano <junkio@cox.net> | 2006-01-08 05:32:48 (GMT) |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-01-08 05:32:48 (GMT) |
commit | 8fc11b5aa98540f7caab87e22e5aae63512893a2 (patch) | |
tree | 42cc20556d8b4766d9a0adbcc2e32de22b9fc6c9 /mailsplit.c | |
parent | 92e802c6ccb96d1b5e8561b0a136d43d82253293 (diff) | |
parent | 6f2eacfeb2c67a7e05f98df2288d7893d3368c8e (diff) | |
download | git-8fc11b5aa98540f7caab87e22e5aae63512893a2.zip git-8fc11b5aa98540f7caab87e22e5aae63512893a2.tar.gz git-8fc11b5aa98540f7caab87e22e5aae63512893a2.tar.bz2 |
GIT 1.0.8v1.0.8
Diffstat (limited to 'mailsplit.c')
-rw-r--r-- | mailsplit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mailsplit.c b/mailsplit.c index eb58b1e..14c1358 100644 --- a/mailsplit.c +++ b/mailsplit.c @@ -169,8 +169,11 @@ int main(int argc, const char **argv) if ( !f ) die ("cannot open mbox %s", file); - if (fgets(buf, sizeof(buf), f) == NULL) + if (fgets(buf, sizeof(buf), f) == NULL) { + if (f == stdin) + break; /* empty stdin is OK */ die("cannot read mbox %s", file); + } while (!file_done) { sprintf(name, "%s/%0*d", dir, nr_prec, ++nr); |