aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 4e679f36ae..2326fb6300 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -1092,7 +1092,7 @@ copy_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelE
{
CamelMimeMessage *msg;
CamelMessageInfo *info = NULL;
-
+
/* Default implementation. */
/* we alredy have the lock, dont deadlock */
@@ -1147,6 +1147,11 @@ camel_folder_copy_messages_to (CamelFolder *source, GPtrArray *uids,
g_return_if_fail (CAMEL_IS_FOLDER (dest));
g_return_if_fail (uids != NULL);
+ if (source == dest) {
+ /* source and destination folders are the same, do nothing. */
+ return;
+ }
+
CAMEL_FOLDER_LOCK(source, lock);
if (source->parent_store == dest->parent_store)