Re: [patch] Re: Why does sortm treat sorting empty folders as an error?

Ralph Corderoy <[email protected]> Sat, 17 Jan 2026 15:59:18 +0000
Newsgroups gmane.mail.nmh.devel
Message-ID <[email protected]>
Hi chaw,

Thanks for the patch.

> please excuse and correct any inconsistencies, omissions, or other
> errors.

Given David asked for another patch submission, I'd prefer not to have
the added ‘else’s given done() doesn't return.

> +    if (mp->nummsg == 0) {
> +      if (emptysw) {
> +        done (0);
> +      }
> +      else {
>          die("no messages in %s", folder);
> +      }
> +    }
...
> +    if ((nmsgs = read_hdrs (mp, datesw)) <= 0) {
> +      if (emptysw) {
> +        done (0);
> +      }
> +      else {
>          die("no messages to sort");
> +      }
> +    }

-- 
Cheers, Ralph.