]> granicus.if.org Git - neomutt/commit
Move mbox close-append logic inside mbox_close_mailbox().
authorKevin McCarthy <kevin@8t8.us>
Tue, 8 Nov 2016 20:42:56 +0000 (12:42 -0800)
committerRichard Russon <rich@flatcap.org>
Fri, 18 Nov 2016 14:00:25 +0000 (14:00 +0000)
commit77c3cad20017cb090fd879dd177f4862faf260d5
tree20a7a7d0fca384ebe6007f5814044ae3aa3641cb
parentaef5bee72bc8d0f91b0fe572340491e4707a1781
Move mbox close-append logic inside mbox_close_mailbox().

The mx_fastclose_mailbox() calls mx_ops->close(), which invokes
mbox_close_mailbox().

Also, close the ctx->fp inside mbox_close_mailbox().  This way, the
(to be added) compress logic can call the mx_ops->close() instead of
"knowing" to close the fp before recompressing.

mx_fastclose_mailbox() will safe_fclose() the fp again, but I'm
leaving it there just in case I missed a usage of the fp in some other
part of the code.

Thanks to Damien Riegel for the original patch.
mbox.c
mx.c