[evolution-data-server] Bug #699811 - Moved IMAPx messages reappear



commit 60b0ad5e3ffe0fd0eb1b8094befa2286af7aef3b
Author: Milan Crha <mcrha redhat com>
Date:   Mon May 13 16:28:44 2013 +0200

    Bug #699811 - Moved IMAPx messages reappear
    
    This affected users whom had configured a real Trash folder.

 camel/camel-imapx-server.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 2a98153..eb20fc4 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6679,10 +6679,15 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is,
                        if (!xinfo)
                                continue;
 
-                       if (data->remove_deleted_flags)
-                               xinfo->info.flags &= ~CAMEL_MESSAGE_DELETED;
                        xinfo->server_flags = xinfo->info.flags & CAMEL_IMAPX_SERVER_FLAGS;
-                       xinfo->info.flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
+                       if (!data->remove_deleted_flags ||
+                           !(xinfo->info.flags & CAMEL_MESSAGE_DELETED)) {
+                               xinfo->info.flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
+                       } else {
+                               /* to stare back the \Deleted flag */
+                               xinfo->server_flags &= ~CAMEL_MESSAGE_DELETED;
+                               xinfo->info.flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
+                       }
                        xinfo->info.dirty = TRUE;
                        camel_flag_list_copy (&xinfo->server_user_flags, &xinfo->info.user_flags);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]