* Fixes NB#91689. fixes a wrong check for ASCII
[modest] / src / modest-tny-account.c
index 63e87ec..cfa79f4 100644 (file)
@@ -117,7 +117,7 @@ modest_tny_account_get_special_folder (TnyAccount *account,
        /* There is no need to do this _async, as these are local folders. */
        /* TODO: However, this seems to fail sometimes when the network is busy, 
         * returning an empty list. murrayc. */ 
-       tny_folder_store_get_folders (TNY_FOLDER_STORE (local_account), folders, NULL, &error);
+       tny_folder_store_get_folders (TNY_FOLDER_STORE (local_account), folders, NULL, FALSE, &error);
        if (error) {
                g_warning ("%s: tny_folder_store_get_folders() failed:%s\n", __FUNCTION__, error->message);
                g_error_free (error);
@@ -345,7 +345,6 @@ modest_tny_account_new_from_server_account_name (ModestAccountMgr *account_mgr,
        ModestServerAccountSettings *server_settings;
        TnyAccount *tny_account;
        ModestProtocolRegistry *protocol_registry;
-       TnyConnectionPolicy *policy;
        
        g_return_val_if_fail (session, NULL);
        g_return_val_if_fail (server_account_name, NULL);
@@ -369,20 +368,25 @@ modest_tny_account_new_from_server_account_name (ModestAccountMgr *account_mgr,
                modest_tny_account_set_parent_modest_account_name_for_server_account (tny_account, server_account_name);
        }
 
-       if (!tny_account)
+       if (!tny_account) {
                g_warning ("%s: failed to create tny_account", __FUNCTION__);
-       else if (!update_tny_account (tny_account, server_settings))
-               g_warning ("%s: failed to initialize tny_account", __FUNCTION__);
-       else {
-               tny_account_set_forget_pass_func (tny_account,
-                                                 forget_pass_func ? forget_pass_func : forget_pass_dummy);
-               tny_account_set_pass_func (tny_account,
-                                          get_pass_func ? get_pass_func: get_pass_dummy);
-       }
+       } else {
+               TnyConnectionPolicy *policy;
 
-       policy = modest_default_connection_policy_new ();
-       tny_account_set_connection_policy (tny_account, policy);
-       g_object_unref (policy);
+               if (!update_tny_account (tny_account, server_settings)) {
+                       g_warning ("%s: failed to initialize tny_account", __FUNCTION__);
+               } else {
+                       
+                       tny_account_set_forget_pass_func (tny_account,
+                                                         forget_pass_func ? forget_pass_func : forget_pass_dummy);
+                       tny_account_set_pass_func (tny_account,
+                                                  get_pass_func ? get_pass_func: get_pass_dummy);
+                       
+               }
+               policy = modest_default_connection_policy_new ();
+               tny_account_set_connection_policy (tny_account, policy);
+               g_object_unref (policy);
+       }
 
        g_object_unref (server_settings);
        
@@ -903,7 +907,7 @@ recurse_folders_async_cb (TnyFolderStore *folder_store,
                if (!TNY_IS_MERGE_FOLDER (folder) && 
                    (TNY_IS_FOLDER (folder) && 
                     tny_folder_get_folder_type (TNY_FOLDER (folder)) != TNY_FOLDER_TYPE_OUTBOX))
-                       tny_folder_store_get_folders_async (folder, folders, NULL,
+                       tny_folder_store_get_folders_async (folder, folders, NULL, FALSE,
                                                            recurse_folders_async_cb, 
                                                            NULL, helper);
                g_object_unref (folders);
@@ -953,7 +957,7 @@ modest_tny_folder_store_get_folder_stats (TnyFolderStore *self,
 
        folders = tny_simple_list_new ();
        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (self),
-                                           folders, NULL,
+                                           folders, NULL, FALSE,
                                            recurse_folders_async_cb, 
                                            NULL, helper);
        g_object_unref (folders);