[Commits] [SCM] claws branch, master, updated. 3.10.1-59-g9aaf30c

Colin colin at claws-mail.org
Sun Jun 15 20:23:27 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  9aaf30c01c5419ca05da35aeafc9f6392389aeb2 (commit)
      from  c981e7a58b09fa2d7753291503e499fa3fee8083 (commit)

Summary of changes:
 src/imap.c |   30 +++---------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)


- Log -----------------------------------------------------------------
commit 9aaf30c01c5419ca05da35aeafc9f6392389aeb2
Author: Colin Leroy <colin at colino.net>
Date:   Sun Jun 15 20:22:43 2014 +0200

    Don't bother renumbering messages before creating a folder with the
    same name on IMAP: just remove the cached file.

diff --git a/src/imap.c b/src/imap.c
index fc3c50d..421b24b 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -2044,28 +2044,6 @@ static gint imap_copy_msgs(Folder *folder, FolderItem *dest,
 	return ret;
 }
 
-static gboolean imap_renumber_msg(MsgInfo *info)
-{
-	GSList msglist;
-	int ret;
-
-	g_return_val_if_fail(info != NULL, -1);
-
-	msglist.data = info;
-	msglist.next = NULL;
-
-	ret = imap_do_copy_msgs(info->folder->folder, info->folder, &msglist,
-				NULL, TRUE);
-	if (ret == 0)
-		ret = imap_do_remove_msgs(info->folder->folder, info->folder,
-					  &msglist, NULL);
-
-	if (ret == 0)
-		ret = folder_item_scan_full(info->folder, FALSE);
-
-	return ret == 0;
-}
-
 static gboolean imap_matcher_type_is_local(gint matchertype)
 {
 	switch (matchertype) {
@@ -3114,11 +3092,9 @@ static FolderItem *imap_create_folder(Folder *folder, FolderItem *parent,
 	g_return_val_if_fail(name != NULL, NULL);
 
 	if (to_number(name) > 0) {
-		MsgInfo *info = folder_item_get_msginfo(parent, to_number(name));
-		if (info != NULL) {
-			gboolean ok = imap_renumber_msg(info);
-			procmsg_msginfo_free(info);
-			if (!ok) {
+		gchar *cached_msg = imap_get_cached_filename(parent, to_number(name));
+		if (is_file_exist(cached_msg)) {
+			if (claws_unlink(cached_msg) != 0) {
 				return NULL;
 			}
 		}

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list