aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2001-02-23 09:40:46 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-02-23 09:40:46 +0800
commitc13a70e866b0591d6719cef1209d8b6c6826ccb9 (patch)
tree01699713449386ffd28829ea3195ec3d59f8762d /camel/camel-folder.c
parent07dea1a5093265e492a76281901179466b6dd4af (diff)
downloadgsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.gz
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.bz2
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.lz
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.xz
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.tar.zst
gsoc2013-evolution-c13a70e866b0591d6719cef1209d8b6c6826ccb9.zip
Doh, cut and paste problem, use mlist not cc.
* camel-folder-summary.c (camel_message_info_new_from_header): Doh, cut and paste problem, use mlist not cc. * camel-folder.c (move_message_to): (copy_message_to): If the source folder doesn't support a summary, dont try and get the message info from it. svn path=/trunk/; revision=8361
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index af9edcfe5d..faff5f7556 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -1057,7 +1057,7 @@ static void
copy_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelException *ex)
{
CamelMimeMessage *msg;
- CamelMessageInfo *info;
+ CamelMessageInfo *info = NULL;
/* Default implementation. */
@@ -1065,11 +1065,18 @@ copy_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelE
msg = CF_CLASS(source)->get_message(source, uid, ex);
if (!msg)
return;
- info = CF_CLASS(source)->get_message_info (source, uid);
+ if (source->has_summary_capability)
+ info = CF_CLASS(source)->get_message_info (source, uid);
+ else
+ info = camel_message_info_new_from_header(((CamelMimePart *)msg)->headers);
camel_folder_append_message (dest, msg, info, ex);
camel_object_unref (CAMEL_OBJECT (msg));
- if (info)
- CF_CLASS(source)->free_message_info(source, info);
+ if (info) {
+ if (source->has_summary_capability)
+ CF_CLASS(source)->free_message_info(source, info);
+ else
+ camel_message_info_free(info);
+ }
}
/**
@@ -1109,21 +1116,27 @@ move_message_to (CamelFolder *source, const char *uid,
CamelFolder *dest, CamelException *ex)
{
CamelMimeMessage *msg;
- CamelMessageInfo *info;
+ CamelMessageInfo *info = NULL;
/* Default implementation. */
msg = CF_CLASS(source)->get_message (source, uid, ex);
if (!msg)
return;
- info = CF_CLASS(source)->get_message_info (source, uid);
+ if (source->has_summary_capability)
+ info = CF_CLASS(source)->get_message_info (source, uid);
+ else
+ info = camel_message_info_new_from_header(((CamelMimePart *)msg)->headers);
camel_folder_append_message (dest, msg, info, ex);
camel_object_unref (CAMEL_OBJECT (msg));
if (!camel_exception_is_set(ex))
CF_CLASS(source)->set_message_flags(source, uid, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
-
- if (info)
- CF_CLASS(source)->free_message_info(source, info);
+ if (info) {
+ if (source->has_summary_capability)
+ CF_CLASS(source)->free_message_info(source, info);
+ else
+ camel_message_info_free(info);
+ }
}
/**