[evolution-data-server] Prefer camel_folder_summary_peek_loaded() when removing CamelMessageInfo
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Prefer camel_folder_summary_peek_loaded() when removing CamelMessageInfo
- Date: Fri, 20 Jul 2012 06:10:37 +0000 (UTC)
commit f4de0b240b00e8760a716f09accd2a47af3db9a2
Author: Milan Crha <mcrha redhat com>
Date: Fri Jul 20 08:10:12 2012 +0200
Prefer camel_folder_summary_peek_loaded() when removing CamelMessageInfo
camel/camel-imapx-server.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index f1b611f..ddf921d 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -1168,10 +1168,12 @@ imapx_expunge_uid_from_summary (CamelIMAPXServer *is,
if (is->changes == NULL)
is->changes = camel_folder_change_info_new ();
- mi = camel_folder_summary_get (is->select_folder->summary, uid);
+ mi = camel_folder_summary_peek_loaded (is->select_folder->summary, uid);
if (mi) {
camel_folder_summary_remove (is->select_folder->summary, mi);
camel_message_info_free (mi);
+ } else {
+ camel_folder_summary_remove_uid (is->select_folder->summary, uid);
}
is->expunged = g_list_prepend (is->expunged, uid);
@@ -5058,10 +5060,12 @@ imapx_command_expunge_done (CamelIMAPXServer *is,
gchar *uid = uids->pdata[i];
CamelMessageInfo *mi;
- mi = camel_folder_summary_get (folder->summary, uid);
+ mi = camel_folder_summary_peek_loaded (folder->summary, uid);
if (mi) {
camel_folder_summary_remove (folder->summary, mi);
camel_message_info_free (mi);
+ } else {
+ camel_folder_summary_remove_uid (folder->summary, uid);
}
camel_folder_change_info_remove_uid (changes, uids->pdata[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]