aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-24 06:16:56 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-24 06:16:56 +0800
commit8734d208092c47cc17a379648b05df9396a4ac83 (patch)
tree97eae97fd1e1109192ffc45b6db92bc812c5486b
parent7db908f5f385bfaea6c962eac7fa84145743a5c1 (diff)
downloadgsoc2013-evolution-8734d208092c47cc17a379648b05df9396a4ac83.tar
gsoc2013-evolution-8734d208092c47cc17a379648b05df9396a4ac83.tar.gz
gsoc2013-evolution-8734d208092c47cc17a379648b05df9396a4ac83.tar.bz2
gsoc2013-evolution-8734d208092c47cc17a379648b05df9396a4ac83.tar.lz
gsoc2013-evolution-8734d208092c47cc17a379648b05df9396a4ac83.tar.xz
gsoc2013-evolution-8734d208092c47cc17a379648b05df9396a4ac83.tar.zst
gsoc2013-evolution-8734d208092c47cc17a379648b05df9396a4ac83.zip
If the source and destination folders are the same, just mark the uids as
2001-07-23 Jeffrey Stedfast <fejj@ximian.com> * 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
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-ops.c15
2 files changed, 21 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 073171617a..3a2a834534 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,8 +1,14 @@
+2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
+
+ * 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).
+
2001-07-23 Jon Trowbridge <trow@ximian.com>
* mail-search.c (begin_cb): Carefully check for NULL everywhere,
- and do the right thing if the message we are currently looking
- at gets expunged. (Bug #4870)
+ and do the right thing if the message we are currently looking at
+ gets expunged. (Bug #4870)
2001-07-23 Jason Leach <jleach@ximian.com>
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);