summaryrefslogtreecommitdiff
path: root/mailsplit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-08 22:22:19 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-08 22:22:19 (GMT)
commit5a2282de13c4da13f979185e652c8a08e2481fd1 (patch)
tree873414f226d848057f9bb64140b629bf5215b9e9 /mailsplit.c
parente77f489edf3865dbcfd329461355523bb3c21075 (diff)
parent8fc11b5aa98540f7caab87e22e5aae63512893a2 (diff)
downloadgit-5a2282de13c4da13f979185e652c8a08e2481fd1.zip
git-5a2282de13c4da13f979185e652c8a08e2481fd1.tar.gz
git-5a2282de13c4da13f979185e652c8a08e2481fd1.tar.bz2
GIT 1.1.0v1.1.0
Diffstat (limited to 'mailsplit.c')
-rw-r--r--mailsplit.c5
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);