talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit b30726c617cf52f2fe2fe0b07113d9a07abed936
parent 1f531cb572b3d826995bba47b7cf9a65042d9d78
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sat,  1 Nov 2014 11:27:41 +0100

When copying a folder, copy its metadata before copying contents.

Diffstat:
Msrc/folder.c | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/folder.c b/src/folder.c @@ -3255,16 +3255,6 @@ static FolderItem *folder_item_move_recursive(FolderItem *src, FolderItem *dest, log_message(LOG_PROTOCOL, copy ?_("Copying %s to %s...\n"):_("Moving %s to %s...\n"), src->name, new_item->path); - mlist = folder_item_get_msg_list(src); - - if (mlist != NULL) { - if (copy) - folder_item_copy_msgs(new_item, mlist); - else - folder_item_move_msgs(new_item, mlist); - procmsg_msg_list_free(mlist); - } - /*copy prefs*/ folder_item_prefs_copy_prefs(src, new_item); @@ -3283,6 +3273,16 @@ static FolderItem *folder_item_move_recursive(FolderItem *src, FolderItem *dest, new_item->sort_key = src->sort_key; new_item->sort_type = src->sort_type; + mlist = folder_item_get_msg_list(src); + + if (mlist != NULL) { + if (copy) + folder_item_copy_msgs(new_item, mlist); + else + folder_item_move_msgs(new_item, mlist); + procmsg_msg_list_free(mlist); + } + prefs_matcher_write_config(); /* recurse */