/* Cancel the mail operation. We need to wrap it between this
start/stop operations to allow following calls to the
account */
- if (priv->account)
- tny_account_cancel (priv->account);
+ g_return_val_if_fail (priv->account, FALSE);
+ tny_account_cancel (priv->account);
return canceled;
}
priv->account = g_object_ref (info->account);
/*
- * for POP3, we do a logout-login upon send/receive -- many POP-servers (like Gmail) do not
- * show any updates unless we do that
+ * Previousl, we did this for POP3, to do a logout-login upon send/receive,
+ * because many POP-servers (like Gmail) do not
+ * show any updates unless we do that.
+ * But that didn't work with gmail anyway,
+ * and tinymail now takes care of this itself by disconnecting
+ * automatically after using the connection.
*/
+ /*
if (!first_time && TNY_IS_CAMEL_POP_STORE_ACCOUNT (priv->account))
tny_camel_pop_store_account_reconnect (TNY_CAMEL_POP_STORE_ACCOUNT(priv->account));
+ */
/* Get all the folders. We can do it synchronously because
we're already running in a different thread than the UI */
parent_rules = modest_tny_folder_get_rules (TNY_FOLDER (parent));
/* The moveable restriction is applied also to copy operation */
- if ((!TNY_IS_FOLDER_STORE (parent)) || (rules & MODEST_FOLDER_RULES_FOLDER_NON_MOVEABLE)) {
+ if ((gpointer) parent == (gpointer) folder ||
+ (!TNY_IS_FOLDER_STORE (parent)) ||
+ (rules & MODEST_FOLDER_RULES_FOLDER_NON_MOVEABLE)) {
printf("DEBUG: %s: Not allowing the move.\n", __FUNCTION__);
/* Set status failed and set an error */
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;