diff options
-rw-r--r-- | libproto/mbox/mbox.c | 12 | ||||
-rw-r--r-- | mailbox/stream.c | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/libproto/mbox/mbox.c b/libproto/mbox/mbox.c index 98d288d0b..c81701e50 100644 --- a/libproto/mbox/mbox.c +++ b/libproto/mbox/mbox.c @@ -298,7 +298,7 @@ _msg_stream_setup (mu_message_t msg, mbox_message_t mum) status = mu_streamref_create_abridged (&stream, mum->mud->mailbox->stream, mum->envel_from_end, - mum->body_end); + mum->body_end - 1); if (status == 0) status = mu_message_set_stream (msg, stream, mum); return status; @@ -1272,16 +1272,6 @@ mbox_expunge_unlocked (mu_mailbox_t mailbox, size_t dirty, int remove_deleted, return status; } } - - status = mu_stream_write (tempstr, "\n", 1, NULL); - if (status) - { - mu_error (_("%s:%d: error writing to temporary stream: %s"), - __FILE__, __LINE__, - mu_strerror (status)); - return status; - } - } /* Caution: before moving data back to the mailbox see diff --git a/mailbox/stream.c b/mailbox/stream.c index 95524ec6b..32db7c6c6 100644 --- a/mailbox/stream.c +++ b/mailbox/stream.c @@ -324,6 +324,8 @@ mu_stream_seek (mu_stream_t stream, mu_off_t offset, int whence, if ((rc = _stream_flush_buffer (stream, 1))) return rc; rc = stream->seek (stream, offset, &stream->offset); + if (rc == ESPIPE) + return rc; if (rc) return _stream_seterror (stream, rc, 1); _stream_cleareof (stream); |