]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox: If save's input stream fails, fail saving instead of ignoring the error.
authorTimo Sirainen <tss@iki.fi>
Wed, 15 May 2013 14:10:28 +0000 (17:10 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 15 May 2013 14:10:28 +0000 (17:10 +0300)
src/lib-storage/index/mbox/mbox-save.c

index 9880083359b190c5a3a932ac0c91432b00ecc778..ff847259eede9390bd4ed16239010be2f599262a 100644 (file)
@@ -635,6 +635,11 @@ int mbox_save_continue(struct mail_save_context *_ctx)
        }
        if (ret == 0)
                return 0;
+       if (ctx->input->stream_errno != 0) {
+               i_error("read(%s) failed: %m", i_stream_get_name(ctx->input));
+               ctx->failed = TRUE;
+               return -1;
+       }
 
        i_assert(ctx->last_char == '\n');