[Commits] [SCM] claws branch, master, updated. 3.14.1-61-g5a66116

ticho at claws-mail.org ticho at claws-mail.org
Mon Dec 19 20:51:50 CET 2016


The branch, master has been updated
       via  5a66116ee95c1ceae362074be6cc286a6c70ecc3 (commit)
      from  22d94ce01f95c50998c3dd8b60a368862a1d3e62 (commit)

Summary of changes:
 src/folder.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 5a66116ee95c1ceae362074be6cc286a6c70ecc3
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Dec 19 20:51:21 2016 +0100

    Allow toplevel folders to be copied.
    
    They are created as regular folders in target mailbox.

diff --git a/src/folder.c b/src/folder.c
index ad75045..458026a 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -3344,14 +3344,18 @@ gint folder_item_move_to(FolderItem *src, FolderItem *dest, FolderItem **new_ite
 		}
 		tmp = folder_item_parent(tmp);
 	}
-	
+
+	/* both dst and src can be root folders */
 	src_identifier = folder_item_get_identifier(src);
+	if (src_identifier == NULL && src->folder && folder_item_parent(src) == NULL) {
+		src_identifier = folder_get_identifier(src->folder);
+	}
+
 	dst_identifier = folder_item_get_identifier(dest);
-	
 	if(dst_identifier == NULL && dest->folder && folder_item_parent(dest) == NULL) {
-		/* dest can be a root folder */
 		dst_identifier = folder_get_identifier(dest->folder);
 	}
+
 	if (src_identifier == NULL || dst_identifier == NULL) {
 		debug_print("Can't get identifiers\n");
 		return F_MOVE_FAILED;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list