Fixed Cygwin CR-munging problem in mailsplit
authorSalikh Zakirov <Salikh.Zakirov@Intel.com>
Sat, 27 May 2006 17:57:29 +0000 (21:57 +0400)
committerJunio C Hamano <junkio@cox.net>
Wed, 31 May 2006 04:46:03 +0000 (21:46 -0700)
Do not open mailbox file as fopen(..., "rt")
as this strips CR characters from the diff,
thus breaking the patch context for changes
in CRLF files.

Signed-off-by: Salikh Zakirov <Salikh.Zakirov@Intel.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
mailsplit.c
index c529e2d060b610d8f0dd80464634a954c4d058e8..70a569c12a9435627e5b61e887ea4f8d3ccfe7dd 100644 (file)
@@ -162,7 +162,7 @@ int main(int argc, const char **argv)
 
        while (*argp) {
                const char *file = *argp++;
-               FILE *f = !strcmp(file, "-") ? stdin : fopen(file, "rt");
+               FILE *f = !strcmp(file, "-") ? stdin : fopen(file, "r");
                int file_done = 0;
 
                if ( !f )