dovecot-2.0: dbox: Fixed reading attachments for compressed mails.
dovecot at dovecot.org
dovecot at dovecot.org
Fri Dec 3 12:15:51 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/235383a75fc7
changeset: 12506:235383a75fc7
user: Timo Sirainen <tss at iki.fi>
date: Fri Dec 03 10:15:48 2010 +0000
description:
dbox: Fixed reading attachments for compressed mails.
diffstat:
src/lib-storage/index/dbox-common/dbox-attachment.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 251612ef4186 -r 235383a75fc7 src/lib-storage/index/dbox-common/dbox-attachment.c
--- 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);
More information about the dovecot-cvs
mailing list