From fc49986ee1e24c28eced9cdff1813ea34ee68755 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 25 Jul 2001 02:15:05 +0000 Subject: Change the break into a continue, we should process as many as we can 2001-07-24 Not Zed * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Change the break into a continue, we should process as many as we can find. * camel-folder.c (camel_folder_move_messages_to): If we have no uid's to copy, exit here before going any further. Some code internally [imap] assumes there are uids to copy otherwise it can segfault. (camel_folder_copy_messages_to): Same. svn path=/trunk/; revision=11392 --- camel/camel-folder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'camel/camel-folder.c') diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 2326fb6300..ca40c8b0dc 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -1147,8 +1147,8 @@ 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. */ + if (source == dest || uids->len == 0) { + /* source and destination folders are the same, or no work to do, do nothing. */ return; } @@ -1228,8 +1228,8 @@ camel_folder_move_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, nothing to do. */ + if (source == dest || uids->len == 0) { + /* source and destination folders are the same, or no work to do, nothing to do. */ return; } -- cgit