From: Pietro Cerutti Date: Mon, 27 Aug 2018 07:51:46 +0000 (+0000) Subject: Attempt to fix the code path to create a new mbox X-Git-Tag: 2019-10-25~680 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=675f77779599d56e6ef1e4a98c3a4c199f67fd43;p=neomutt Attempt to fix the code path to create a new mbox --- diff --git a/mx.c b/mx.c index 439fe88ae..f0bcd635d 100644 --- a/mx.c +++ b/mx.c @@ -182,8 +182,15 @@ static int mx_open_mailbox_append(struct Context *ctx, int flags) ctx->magic = mx_path_probe(ctx->path, NULL); if (ctx->magic == MUTT_UNKNOWN) { - mutt_error(_("%s is not a mailbox"), ctx->path); - return -1; + if (flags & (MUTT_APPEND | MUTT_NEWFOLDER)) + { + ctx->magic = MUTT_MAILBOX_ERROR; + } + else + { + mutt_error(_("%s is not a mailbox"), ctx->path); + return -1; + } } if (ctx->magic == MUTT_MAILBOX_ERROR)