}
TnyAccount*
-modest_tny_account_store_get_tny_account_by_account (ModestTnyAccountStore *self,
+modest_tny_account_store_get_server_account (ModestTnyAccountStore *self,
const gchar *account_name,
TnyAccountType type)
{
priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
/* Special case for the local account */
- if (!strcmp (account_name, MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID) &&
- type == TNY_ACCOUNT_TYPE_STORE) {
- id = g_strdup (MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID);
+ if (!strcmp (account_name, MODEST_LOCAL_FOLDERS_ACCOUNT_ID)) {
+ if(type == TNY_ACCOUNT_TYPE_STORE)
+ id = g_strdup (MODEST_LOCAL_FOLDERS_ACCOUNT_ID);
+ else {
+ /* The local folders modest account has no transport server account. */
+ return NULL;
+ }
} else {
ModestAccountData *account_data;
* just get the regular transport account: */
if (!account) {
/* printf("DEBUG: %s: using regular transport account for account %s.\n", __FUNCTION__, account_name); */
- account = modest_tny_account_store_get_tny_account_by_account (self, account_name,
+
+ /* The special local folders don't have transport accounts. */
+ if (strcmp (account_name, MODEST_LOCAL_FOLDERS_ACCOUNT_ID) == 0)
+ account = NULL;
+ else
+ account = modest_tny_account_store_get_server_account (self, account_name,
TNY_ACCOUNT_TYPE_TRANSPORT);
}