From 8734d208092c47cc17a379648b05df9396a4ac83 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 23 Jul 2001 22:16:56 +0000 Subject: If the source and destination folders are the same, just mark the uids as 2001-07-23 Jeffrey Stedfast * mail-ops.c (transfer_messages_transfer): If the source and destination folders are the same, just mark the uids as undeleted (in case they were marked as deleted before). svn path=/trunk/; revision=11322 --- mail/mail-ops.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'mail/mail-ops.c') diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 0a4e21160e..67494084f1 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -915,13 +915,24 @@ transfer_messages_transfer (struct _mail_msg *mm) if (m->delete) { int i; + /* Just mark all the messages as deleted */ for (i = 0; i < m->uids->len; i++) camel_folder_delete_message (m->source, m->uids->pdata[i]); } else { /* no-op - can't copy messages to*/ } - } else - (func) (m->source, m->uids, dest, &mm->ex); + } else { + if (dest == m->source) { + int i; + + /* Undelete the messages if they are marked as deleted */ + for (i = 0; i < m->uids->len; i++) + camel_folder_set_message_flags (m->source, uids->pdata[i], + CAMEL_MESSAGE_DELETED, 0) + } else { + (func) (m->source, m->uids, dest, &mm->ex); + } + } camel_folder_thaw (m->source); camel_folder_thaw (dest); -- cgit v1.2.3