Mercurial > dovecot > core-2.2
diff src/lib-storage/index/mbox/istream-raw-mbox.c @ 4327:dbae2347dcdb HEAD
Handle i_stream_stat() better.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 08 Jun 2006 22:26:53 +0300 |
parents | 08a302d3e525 |
children | ccd102aef7ad |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c Thu Jun 08 21:52:40 2006 +0300 +++ b/src/lib-storage/index/mbox/istream-raw-mbox.c Thu Jun 08 22:26:53 2006 +0300 @@ -309,8 +309,15 @@ static const struct stat *_stat(struct _istream *stream, bool exact) { struct raw_mbox_istream *rstream = (struct raw_mbox_istream *)stream; + const struct stat *st; - return i_stream_stat(rstream->input, exact); + st = i_stream_stat(rstream->input, exact); + if (st == NULL) + return NULL; + + stream->statbuf = *st; + stream->statbuf.st_size = -1; + return &stream->statbuf; } struct istream *i_stream_create_raw_mbox(pool_t pool, struct istream *input)