From: Richard Russon Date: Fri, 15 Feb 2019 23:14:48 +0000 (+0000) Subject: comp_mbox_close: swap if clauses X-Git-Tag: 2019-10-25~369^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad5d23f2e5d2d60baa7ccd947fff3a872f2d76cd;p=neomutt comp_mbox_close: swap if clauses --- diff --git a/compress.c b/compress.c index 13a3aa822..e33fd56b6 100644 --- a/compress.c +++ b/compress.c @@ -708,19 +708,7 @@ static int comp_mbox_close(struct Mailbox *m) ops->mbox_close(m); /* sync has already been called, so we only need to delete some files */ - if (!m->append) - { - /* If the file was removed, remove the compressed folder too */ - if ((access(m->path, F_OK) != 0) && !SaveEmpty) - { - remove(m->realpath); - } - else - { - remove(m->path); - } - } - else + if (m->append) { const char *append = NULL; const char *msg = NULL; @@ -748,6 +736,18 @@ static int comp_mbox_close(struct Mailbox *m) unlock_realpath(m); } + else + { + /* If the file was removed, remove the compressed folder too */ + if ((access(m->path, F_OK) != 0) && !SaveEmpty) + { + remove(m->realpath); + } + else + { + remove(m->path); + } + } free_compress_info(m);