summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bf9b450)
* 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
#include <modest-platform.h>
#include <modest-text-utils.h>
#include <tny-msg.h>
#include <modest-platform.h>
#include <modest-text-utils.h>
#include <tny-msg.h>
+#include <tny-camel-mem-stream.h>
static GObjectClass *parent_class = NULL;
static GObjectClass *parent_class = NULL;
gchar *size_string;
if (priv->get_size_stream == NULL) {
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);
}
readed_size = tny_stream_read (priv->get_size_stream, read_buffer, GET_SIZE_BUFFER_SIZE);