From: Richard Russon Date: Tue, 24 Jan 2017 17:20:27 +0000 (+0000) Subject: fix bug in "Support for aborting mailbox loading" X-Git-Tag: neomutt-20170128~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a18451acf972194684f39ef859e58e4bde23042d;p=neomutt fix bug in "Support for aborting mailbox loading" A typo would have prevented mbox_parse_mailbox() from working correctly. Also, add a few comments. Thanks to Pietro Cerutti (@gahr) for spotting this. --- diff --git a/mbox.c b/mbox.c index ee9fc0e14..edec339a9 100644 --- a/mbox.c +++ b/mbox.c @@ -226,7 +226,7 @@ int mmdf_parse_mailbox (CONTEXT *ctx) if (SigInt == 1) { SigInt = 0; - return -2; + return -2; /* action aborted */ } return 0; @@ -282,7 +282,7 @@ int mbox_parse_mailbox (CONTEXT *ctx) } loc = ftello (ctx->fp); - while ((fgets (buf, sizeof (buf), ctx->fp) != NULL) && (SigInt != 0)) + while ((fgets (buf, sizeof (buf), ctx->fp) != NULL) && (SigInt != 1)) { if (is_from (buf, return_path, sizeof (return_path), &t)) { @@ -420,7 +420,7 @@ int mbox_parse_mailbox (CONTEXT *ctx) if (SigInt == 1) { SigInt = 0; - return -2; + return -2; /* action aborted */ } return 0; diff --git a/mh.c b/mh.c index 13f65484b..6ce17f923 100644 --- a/mh.c +++ b/mh.c @@ -888,7 +888,7 @@ static int maildir_parse_dir (CONTEXT * ctx, struct maildir ***last, if (SigInt == 1) { SigInt = 0; - return -2; + return -2; /* action aborted */ } return 0;