diff options
author | Not Zed <NotZed@Ximian.com> | 2001-07-12 10:22:23 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-07-12 10:22:23 +0800 |
commit | 05e4067b622c3548db76c04c4dfbf0ef340800e7 (patch) | |
tree | 10c341daf2664adddd6982b7714b628bf9bb17f4 /camel/providers | |
parent | 405cdd1ea2729f05512a3d9052a5683c34f556b1 (diff) | |
download | gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.gz gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.bz2 gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.lz gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.xz gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.tar.zst gsoc2013-evolution-05e4067b622c3548db76c04c4dfbf0ef340800e7.zip |
Removed some code i wasn't supposed to commit.
2001-07-12 Not Zed <NotZed@Ximian.com>
* camel-folder-summary.c
(camel_folder_summary_info_new_from_message): Removed some code i
wasn't supposed to commit.
* providers/local/camel-local-summary.c (local_summary_add): Only
set info->size if it is not zero.
(local_summary_add): If we dont get a size from the info passed
in, calculate it using a null stream write. Should do #4392.
svn path=/trunk/; revision=11025
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/local/camel-local-summary.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c index a1f1c1334b..c925e6e36a 100644 --- a/camel/providers/local/camel-local-summary.c +++ b/camel/providers/local/camel-local-summary.c @@ -33,7 +33,8 @@ #include <stdlib.h> #include "camel-local-summary.h" -#include <camel/camel-mime-message.h> +#include "camel/camel-mime-message.h" +#include "camel/camel-stream-null.h" #define io(x) #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/ @@ -393,8 +394,19 @@ local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMess } mi->flags = mi->flags | (info->flags & 0xffff); - mi->size = info->size; + if (info->size) + mi->size = info->size; } + + /* we need to calculate the size ourselves */ + if (mi->size == 0) { + CamelStreamNull *sn = (CamelStreamNull *)camel_stream_null_new(); + + camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, (CamelStream *)sn); + mi->size = sn->written; + camel_object_unref((CamelObject *)sn); + } + mi->flags &= ~(CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED); xev = camel_local_summary_encode_x_evolution(cls, mi); camel_medium_set_header((CamelMedium *)msg, "X-Evolution", xev); |