Mercurial > dovecot > core-2.2
changeset 12506:235383a75fc7
dbox: Fixed reading attachments for compressed mails.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 03 Dec 2010 10:15:48 +0000 |
parents | 251612ef4186 |
children | 2ec2fde979be |
files | src/lib-storage/index/dbox-common/dbox-attachment.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-common/dbox-attachment.c Fri Dec 03 10:15:20 2010 +0000 +++ b/src/lib-storage/index/dbox-common/dbox-attachment.c Fri Dec 03 10:15:48 2010 +0000 @@ -146,7 +146,7 @@ const struct mail_attachment_extref *extref; struct istream **inputs, *input, *input2; const char *path, *path_suffix; - uoff_t last_voffset = 0; + uoff_t psize, last_voffset = 0; unsigned int i; t_array_init(&extrefs_arr, 16); @@ -185,9 +185,9 @@ array_append(&streams, &input, 1); } - if (file->cur_physical_size != (*stream)->v_offset) { - uoff_t trailer_size = file->cur_physical_size - - (*stream)->v_offset; + psize = dbox_file_get_plaintext_size(file); + if (psize != (*stream)->v_offset) { + uoff_t trailer_size = psize - (*stream)->v_offset; input = i_stream_create_limit(*stream, trailer_size); array_append(&streams, &input, 1);