diff options
Diffstat (limited to 'mshow.c')
-rw-r--r-- | mshow.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mshow.c b/mshow.c index c24f31f..f836b76 100644 --- a/mshow.c +++ b/mshow.c @@ -443,13 +443,17 @@ extract_mime(int depth, struct message *msg, char *body, size_t bodylen) if (errno == 0 && !*b && d == mimecount) { // extract by id if (extract_stdout) { - if (Hflag) { + if (rflag) { fwrite(blaze822_orig_header(msg), 1, blaze822_headerlen(msg), stdout); printf("\n\n"); + fwrite(blaze822_body(msg), + 1, blaze822_bodylen(msg), + stdout); + } else { + fwrite(body, 1, bodylen, stdout); } - fwrite(body, 1, bodylen, stdout); } else { char buf[255]; char *bufptr; @@ -467,13 +471,17 @@ extract_mime(int depth, struct message *msg, char *body, size_t bodylen) fnmatch(a, filename, FNM_PATHNAME) == 0) { // extract by name if (extract_stdout) { - if (Hflag) { + if (rflag) { fwrite(blaze822_orig_header(msg), 1, blaze822_headerlen(msg), stdout); printf("\n\n"); + fwrite(blaze822_body(msg), + 1, blaze822_bodylen(msg), + stdout); + } else { + fwrite(body, 1, bodylen, stdout); } - fwrite(body, 1, bodylen, stdout); } else { printf("%s\n", filename); writefile(filename, body, bodylen); |