diff options
author | Leah Neukirchen <leah@vuxu.org> | 2018-01-09 17:01:35 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2018-01-09 17:01:35 +0100 |
commit | e2c243bc26fb7f98935a0c1e15463982c87d588f (patch) | |
tree | 5dc5bf88af706c54ad2b31ed938e1c1eaeead792 | |
parent | 4bf38b9751e8affa6407dac49b78bc9f1a19eb79 (diff) | |
download | mblaze-e2c243bc26fb7f98935a0c1e15463982c87d588f.tar.gz mblaze-e2c243bc26fb7f98935a0c1e15463982c87d588f.tar.xz mblaze-e2c243bc26fb7f98935a0c1e15463982c87d588f.zip |
mshow: exit with status 1 if -R didn't find a plain text reply
-rw-r--r-- | mshow.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mshow.c b/mshow.c index 98c309e..1a98801 100644 --- a/mshow.c +++ b/mshow.c @@ -36,6 +36,8 @@ struct message *filters; static int mimecount; static int safe_output; +static int reply_found; + static char defaultAflags[] = "text/plain:text/html"; static char *Aflag = defaultAflags; @@ -356,6 +358,7 @@ reply_mime(int depth, struct message *msg, char *body, size_t bodylen) print_ascii(body, bodylen); else print_u8recode(body, bodylen, charset); + reply_found++; free(charset); } @@ -404,7 +407,10 @@ reply(char *file) struct message *msg = blaze822_file(file); if (!msg) return; + reply_found = 0; blaze822_walk_mime(msg, 0, reply_mime); + if (!reply_found) + exit(1); } static int extract_argc; |