#include <libgnomevfs/gnome-vfs.h>
#include "modest-utils.h"
#include "modest-debug.h"
+#ifdef MODEST_USE_LIBTIME
+#include <clockd/libtime.h>
+#endif
#define KB 1024
self = helper->mail_op;
priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
- if (cancelled || err)
+ if (cancelled)
goto end;
if (err) {
self = helper->mail_op;
priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
- if (cancelled || err)
+ if (cancelled)
goto end;
if (err) {
ModestAccountRetrieveType retrieve_type;
TnyList *new_headers = NULL;
gboolean headers_only, ignore_limit;
+ time_t time_to_store;
info = (UpdateAccountInfo *) user_data;
priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
}
/* Set the last updated as the current time */
- modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time (NULL));
+#ifdef MODEST_USE_LIBTIME
+ struct tm utc_tm;
+ time_get_utc (&utc_tm);
+ time_to_store = time_mktime (&utc_tm, "GMT");
+#else
+ time_to_store = time (NULL);
+#endif
+ modest_account_mgr_set_last_updated (mgr, tny_account_get_id (priv->account), time_to_store);
/* Get the message max size */
max_size = modest_conf_get_int (modest_runtime_get_conf (),
}
}
- if (!strcmp (name, " ") || strchr (name, '/')) {
+ if (!priv->error && (!strcmp (name, " ") || strchr (name, '/'))) {
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
MODEST_MAIL_OPERATION_ERROR_FOLDER_RULES,
local_account = (ModestTnyLocalFoldersAccount *)
modest_tny_account_store_get_local_folders_account (accstore);
- g_object_unref (folder);
- folder = modest_tny_local_folders_account_get_merged_outbox (local_account);
folder_type = modest_tny_folder_get_local_or_mmc_folder_type (folder);
+ if (folder_type == TNY_FOLDER_TYPE_OUTBOX) {
+ g_object_unref (folder);
+ folder = modest_tny_local_folders_account_get_merged_outbox (local_account);
+ }
g_object_unref (local_account);
}