diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-folder.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 1a94bd7942..a55a98b336 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2001-07-05 Jeffrey Stedfast <fejj@ximian.com> + + * camel-folder.c (camel_folder_copy_messages_to): if source == + dest, just no-op. + 2001-07-05 Peter Williams <peterw@ximian.com> * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the 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) |