Commit 66c992c3 66c992c3780eb1191c5644c4f3068da5abaae2ec by Sergey Poznyakoff

Further bugfixes.

* libproto/mbox/mbox.c (_msg_stream_setup): Fix abridgement limits.
(mbox_expunge_unlocked): Don't write extra newline after each
message.
* mailbox/stream.c (mu_stream_seek): ESPIPE does not constitute
a permanent error.
1 parent c7491f22
......@@ -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
......
......@@ -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);
......