]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox: Be sure to flush output when writing to non-seekable "mboxes" (pipes).
authorTimo Sirainen <tss@iki.fi>
Mon, 26 May 2008 21:16:12 +0000 (00:16 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 26 May 2008 21:16:12 +0000 (00:16 +0300)
--HG--
branch : HEAD

src/lib-storage/index/mbox/mbox-save.c

index 4d3b9a078ab841b8bb3d9cc4056ed222bda9beb4..e270326f03e5e42a20d8a46eaacc47d375e02901 100644 (file)
@@ -653,6 +653,10 @@ int mbox_save_finish(struct mail_save_context *_ctx)
 {
        struct mbox_save_context *ctx = (struct mbox_save_context *)_ctx;
 
+       /* make sure everything is written */
+       if (o_stream_flush(ctx->output) < 0)
+               return write_error(ctx);
+
        ctx->finished = TRUE;
        if (!ctx->failed) {
                T_BEGIN {