From: Jose Dapena Paz Date: Fri, 6 Jul 2007 14:43:49 +0000 (+0000) Subject: * src/widgets/modest-attachment-view.c: X-Git-Tag: git_migration_finished~2924 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=f204efc3b047b7e42f46904c4279a5af8be9f407 * src/widgets/modest-attachment-view.c: * Count the decoded attachment size instead of the encoded size. This should make the size be the expected one (fixes NB#61088). pmo-trunk-r2614 --- diff --git a/src/widgets/modest-attachment-view.c b/src/widgets/modest-attachment-view.c index 6eebfe6..c2ea039 100644 --- a/src/widgets/modest-attachment-view.c +++ b/src/widgets/modest-attachment-view.c @@ -38,6 +38,7 @@ #include #include #include +#include static GObjectClass *parent_class = NULL; @@ -136,7 +137,9 @@ get_size_idle_func (gpointer data) gchar *size_string; if (priv->get_size_stream == NULL) { - priv->get_size_stream = tny_mime_part_get_stream (priv->mime_part); + priv->get_size_stream = tny_camel_mem_stream_new (); + tny_mime_part_decode_to_stream (priv->mime_part, priv->get_size_stream); + tny_stream_reset (priv->get_size_stream); } readed_size = tny_stream_read (priv->get_size_stream, read_buffer, GET_SIZE_BUFFER_SIZE);