From 90a03746553352b776dd49959f7d235b137de543 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 29 May 2019 10:47:12 +0200 Subject: [PATCH] I#108 - [IMAPx] Folder changes could be claimed in a wrong folder after APPEND Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/108 --- src/camel/providers/imapx/camel-imapx-server.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/camel/providers/imapx/camel-imapx-server.c b/src/camel/providers/imapx/camel-imapx-server.c index 0eae047e7..e86d4e605 100644 --- a/src/camel/providers/imapx/camel-imapx-server.c +++ b/src/camel/providers/imapx/camel-imapx-server.c @@ -4852,6 +4852,7 @@ camel_imapx_server_copy_message_sync (CamelIMAPXServer *is, if (camel_folder_change_info_changed (dest_changes)) { camel_folder_summary_touch (destination_summary); camel_folder_summary_save (destination_summary, NULL); + imapx_update_store_summary (destination_folder); camel_folder_changed (destination_folder, dest_changes); } @@ -5107,6 +5108,7 @@ camel_imapx_server_append_message_sync (CamelIMAPXServer *is, if (ic->status && ic->status->condition == IMAPX_APPENDUID) { c (is->priv->tagprefix, "Got appenduid %u %u\n", (guint32) ic->status->u.appenduid.uidvalidity, ic->status->u.appenduid.uid); if (ic->status->u.appenduid.uidvalidity == uidvalidity) { + CamelFolderChangeInfo *dest_changes; gchar *uid; uid = g_strdup_printf ("%u", ic->status->u.appenduid.uid); @@ -5127,11 +5129,13 @@ camel_imapx_server_append_message_sync (CamelIMAPXServer *is, camel_folder_summary_add (camel_folder_get_folder_summary (folder), clone, TRUE); - g_mutex_lock (&is->priv->changes_lock); - camel_folder_change_info_add_uid (is->priv->changes, camel_message_info_get_uid (clone)); - g_mutex_unlock (&is->priv->changes_lock); + dest_changes = camel_folder_change_info_new (); + camel_folder_change_info_add_uid (dest_changes, camel_message_info_get_uid (clone)); camel_folder_summary_save (camel_folder_get_folder_summary (folder), NULL); + imapx_update_store_summary (folder); + camel_folder_changed (folder, dest_changes); + camel_folder_change_info_free (dest_changes); if (appended_uid) *appended_uid = uid; @@ -6403,7 +6407,7 @@ camel_imapx_server_expunge_sync (CamelIMAPXServer *is, camel_folder_summary_remove_uids (folder_summary, removed); camel_folder_summary_save (folder_summary, NULL); - + imapx_update_store_summary (folder); camel_folder_changed (folder, changes); camel_folder_change_info_free (changes); -- 2.21.0