From 0da278a9ad87848aaf012b084286916082333e93 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 21 Jan 2017 17:13:47 +0100 Subject: mlist: don't use blaze822_loop for the case when arguments are given blaze822_loop replaces directory arguments with all cur/ mails, which is not what we want in mlist. --- mlist.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mlist.c') diff --git a/mlist.c b/mlist.c index 0f7bd88..4e40eb5 100644 --- a/mlist.c +++ b/mlist.c @@ -255,10 +255,14 @@ main(int argc, char *argv[]) flagsum++; } - if (optind == argc && isatty(0)) - goto usage; - else - blaze822_loop(argc-optind, argv+optind, listarg); + if (optind == argc) { + if (isatty(0)) + goto usage; + blaze822_loop(0, 0, listarg); + } else { + for (i = optind; i < argc; i++) + listarg(argv[i]); + } if (iflag && imatched) printf("%6ld unseen %3ld flagged %6ld msg\n", -- cgit 1.4.1