ctx->mx_ops ends up being NULL for both the case that ctx->magic is 0
and -1. This meant the mutt_perror() error message was never being
printed, because the check for ctx->mx_ops == NULL was taking place
first.
Move the "ctx->magic == -1" check first, so mutt will print out an
appropriate perror message in that case.
if (ctx->magic <= 0 || !ctx->mx_ops)
{
- if (ctx->magic == 0 || !ctx->mx_ops)
- mutt_error (_("%s is not a mailbox."), path);
- else if (ctx->magic == -1)
+ if (ctx->magic == -1)
mutt_perror(path);
+ else if (ctx->magic == 0 || !ctx->mx_ops)
+ mutt_error (_("%s is not a mailbox."), path);
mx_fastclose_mailbox (ctx);
if (!pctx)