[dovecot-cvs]
dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.40,
1.40.2.1
cras at dovecot.org
cras at dovecot.org
Thu Jun 8 22:26:26 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv18386/lib-storage/index/mbox
Modified Files:
Tag: branch_1_0
istream-raw-mbox.c
Log Message:
Handle i_stream_stat() better.
Index: istream-raw-mbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c,v
retrieving revision 1.40
retrieving revision 1.40.2.1
diff -u -d -r1.40 -r1.40.2.1
--- istream-raw-mbox.c 26 Jan 2006 20:42:49 -0000 1.40
+++ istream-raw-mbox.c 8 Jun 2006 19:26:24 -0000 1.40.2.1
@@ -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)
More information about the dovecot-cvs
mailing list