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.c8
1 files changed, 4 insertions, 4 deletions
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;
}