aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-folder.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.c')
-rw-r--r--camel/providers/imap/camel-imap-folder.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index b05dcfb5e4..f30c731e0c 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1103,8 +1103,15 @@ imap_update_summary (CamelFolder *folder,
if (g_datalist_get_data (&fetch_data, "UID"))
camel_message_info_set_uid (mi, g_strdup (g_datalist_get_data (&fetch_data, "UID")));
- if (g_datalist_get_data (&fetch_data, "FLAGS"))
- mi->flags = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "FLAGS"));
+ if (g_datalist_get_data (&fetch_data, "FLAGS")) {
+ guint32 flags = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "FLAGS"));
+
+ ((CamelImapMessageInfo *)mi)->server_flags = flags;
+ /* "or" them in with the existing flags that may
+ * have been set by summary_info_new_from_message.
+ */
+ mi->flags |= flags;
+ }
if (g_datalist_get_data (&fetch_data, "RFC822.SIZE"))
mi->size = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "RFC822.SIZE"));