X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-mail-operation.c;h=55d5c862f26829f3835925b9986a727fc4309d72;hp=7aa62827fa2185fc6415237edcd2c627b06f5b23;hb=83c3671f0e0b2ff021d3cb8b37653e66c1e38066;hpb=3a38b9c7247e837a7b8e4465927b09d9b82598f5 diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 7aa6282..55d5c86 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -2151,8 +2151,11 @@ get_msg_async_cb (TnyFolder *folder, finished = (priv->done == priv->total) ? TRUE : FALSE; } - /* Check errors */ - if (canceled || err) { + /* If canceled by the user, ignore the error given by Tinymail */ + if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED) { + canceled = TRUE; + finished = TRUE; + } else if (canceled || err) { priv->status = MODEST_MAIL_OPERATION_STATUS_FINISHED_WITH_ERRORS; if (err) { priv->error = g_error_copy ((const GError *) err); @@ -2166,9 +2169,6 @@ get_msg_async_cb (TnyFolder *folder, } else if (finished && priv->status == MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS) { /* Set the success status before calling the user callback */ priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS; - } else if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED) { - canceled = TRUE; - finished = TRUE; }