Mercurial > dovecot > core-2.2
changeset 645:0834f1490e68 HEAD
lseek() to beginning of file before creating file ibuffer.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 21 Nov 2002 22:43:25 +0200 |
parents | 415498fa78d6 |
children | ea7099259c57 |
files | src/lib-index/mbox/mbox-index.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-index.c Thu Nov 21 22:31:02 2002 +0200 +++ b/src/lib-index/mbox/mbox-index.c Thu Nov 21 22:43:25 2002 +0200 @@ -78,6 +78,11 @@ MAIL_MMAP_BLOCK_SIZE, 0, 0, FALSE); } else { + if (lseek(index->mbox_fd, 0, SEEK_SET) < 0) { + mbox_set_syscall_error(index, "lseek()"); + return NULL; + } + index->mbox_inbuf = i_buffer_create_file(index->mbox_fd, default_pool,