2007-11-05 [colin] 3.0.2cvs118
authorColin Leroy <colin@colino.net>
Mon, 5 Nov 2007 16:58:56 +0000 (16:58 +0000)
committerColin Leroy <colin@colino.net>
Mon, 5 Nov 2007 16:58:56 +0000 (16:58 +0000)
* src/imap.c
Fix deletion

ChangeLog
PATCHSETS
configure.ac
src/imap.c

index 36c68b83d6622af9d2efd263ff0f82e8765887a6..3ccf5789f4f52e62254a6e945254bf2293257ca4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-05 [colin]     3.0.2cvs118
+
+       * src/imap.c
+               Fix deletion 
+
 2007-11-05 [iwkse]     3.0.2cvs117
 
        * src/prefs_summary_open.c
index f8083dc7f8b0623abb913812c2cce96b1bef3a75..6df72a8f3af8fd7d9026214a16585deebd3c9e79 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.30.2.24 -r 1.30.2.25 tools/README;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 tools/claws-mail-compose-insert-files.pl;  ) > 3.0.2cvs115.patchset
 ( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/addressbook_foldersel.c;  ) > 3.0.2cvs116.patchset
 ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/prefs_summary_open.c;  ) > 3.0.2cvs117.patchset
+( cvs diff -u -r 1.179.2.196 -r 1.179.2.197 src/imap.c;  ) > 3.0.2cvs118.patchset
index 5938edbd7c89f1218e72353a3669d9eeff1b2d3a..33ae82cbd82c441d45e34dffdab0ddd8c9342b5a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=117
+EXTRA_VERSION=118
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 7cbef77986a39cef007a2aec5e97a580c51217fa..06cb2805d8acbf4159eefdbb536010cd826ecdf3 100644 (file)
@@ -1803,18 +1803,21 @@ static gint imap_do_remove_msgs(Folder *folder, FolderItem *dest,
        uid_mapping = g_relation_new(2);
        g_relation_index(uid_mapping, 0, g_direct_hash, g_direct_equal);
 
-       ok = imap_set_message_flags
-               (session, numlist, IMAP_FLAG_DELETED, TRUE);
-       if (ok != MAILIMAP_NO_ERROR) {
-               log_warning(LOG_PROTOCOL, _("can't set deleted flags\n"));
-               return ok;
-       }
+       if (numlist != NULL) {
+               ok = imap_set_message_flags
+                       (session, numlist, IMAP_FLAG_DELETED, TRUE);
+               if (ok != MAILIMAP_NO_ERROR) {
+                       log_warning(LOG_PROTOCOL, _("can't set deleted flags\n"));
+                       return ok;
+               }
+       } /* else we just need to expunge */
        ok = imap_cmd_expunge(session);
        if (ok != MAILIMAP_NO_ERROR) {
                log_warning(LOG_PROTOCOL, _("can't expunge\n"));
                return ok;
        }
        
+       session->folder_content_changed = TRUE;
        unlock_session(session);
 
        dir = folder_item_get_path(msginfo->folder);
@@ -1829,6 +1832,8 @@ static gint imap_do_remove_msgs(Folder *folder, FolderItem *dest,
        g_relation_destroy(uid_mapping);
        g_slist_free(numlist);
 
+       imap_scan_required(folder, dest);
+
        g_free(destdir);
        if (ok == MAILIMAP_NO_ERROR)
                return 0;