* Only return the local account if we're asking for store accounts
authorSergio Villar Senin <svillar@igalia.com>
Mon, 28 May 2007 08:18:45 +0000 (08:18 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 28 May 2007 08:18:45 +0000 (08:18 +0000)
pmo-trunk-r1978

src/modest-tny-account-store.c

index 46773b5..a8ece28 100644 (file)
@@ -944,7 +944,8 @@ modest_tny_account_store_get_tny_account_by_account (ModestTnyAccountStore *self
        priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
 
        /* Special case for the local account */
        priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
 
        /* Special case for the local account */
-       if (!strcmp (account_name, MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID)) {
+       if (!strcmp (account_name, MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID) && 
+           type == TNY_ACCOUNT_TYPE_STORE) {
                id = g_strdup (MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID);
        } else {
                ModestAccountData *account_data;
                id = g_strdup (MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID);
        } else {
                ModestAccountData *account_data;