From: Sergio Villar Senin Date: Wed, 18 Feb 2009 15:08:35 +0000 (+0000) Subject: * Fixes NB#102317, do not update the last time updated if the inbox refresh fails X-Git-Tag: git_migration_finished~547 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=2bedf05646b777d37f19178e989c6112b1544b2a * Fixes NB#102317, do not update the last time updated if the inbox refresh fails pmo-trunk-r7553 --- diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 75aa517..39d1629 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -1535,7 +1535,7 @@ inbox_refreshed_cb (TnyFolder *inbox, UpdateAccountInfo *info; ModestMailOperationPrivate *priv; TnyIterator *new_headers_iter; - GPtrArray *new_headers_array = NULL; + GPtrArray *new_headers_array = NULL; gint max_size, retrieve_limit, i; ModestAccountMgr *mgr; ModestAccountRetrieveType retrieve_type; @@ -1546,9 +1546,6 @@ inbox_refreshed_cb (TnyFolder *inbox, priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op); mgr = modest_runtime_get_account_mgr (); - /* Set the last updated as the current time, do it even if the inbox refresh failed */ - modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time (NULL)); - if (canceled || err) { priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED; if (err) @@ -1572,6 +1569,9 @@ inbox_refreshed_cb (TnyFolder *inbox, goto send_mail; } + /* Set the last updated as the current time */ + modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time (NULL)); + /* Get the message max size */ max_size = modest_conf_get_int (modest_runtime_get_conf (), MODEST_CONF_MSG_SIZE_LIMIT, NULL);