X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-folder.c;h=ee0f22446c31beb68e2504ee6fa9b598d4736726;hp=8188eeb2a2f00ea5be27afa8e5985dc36a8baff9;hb=5ae15264f96450bf0568b3ea017e4440d8f9e5bf;hpb=a0165434d682c6ce44934fd247a1c414df7fe49c diff --git a/src/modest-tny-folder.c b/src/modest-tny-folder.c index 8188eeb..ee0f224 100644 --- a/src/modest-tny-folder.c +++ b/src/modest-tny-folder.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -84,6 +85,9 @@ modest_tny_folder_guess_folder_type (TnyFolder *folder) if ((strlen (downcase) == 5) && !strncmp (downcase, "inbox", 5)) type = TNY_FOLDER_TYPE_INBOX; + if ((strlen (downcase) == 7) && + !strncmp (downcase, "archive", 7)) + type = TNY_FOLDER_TYPE_ARCHIVE; g_free (downcase); } g_object_unref (parent); @@ -255,9 +259,9 @@ gboolean modest_tny_folder_is_memory_card_folder (TnyFolder *folder) { g_return_val_if_fail (folder, FALSE); - - /* The merge folder is a special case, - * used to merge the per-account local outbox folders. + + /* The merge folder is a special case, + * used to merge the per-account local outbox folders. * and can have no get_account() implementation. */ if (TNY_IS_MERGE_FOLDER (folder)) @@ -268,15 +272,15 @@ modest_tny_folder_is_memory_card_folder (TnyFolder *folder) return FALSE; const gchar* account_id = tny_account_get_id (account); - if (!account_id) { + if (!account_id) { g_object_unref (account); return FALSE; } g_object_unref (account); - + return (strcmp (account_id, MODEST_MMC_ACCOUNT_ID) == 0); -} +} gboolean modest_tny_folder_is_remote_folder (TnyFolder *folder) @@ -429,6 +433,7 @@ modest_tny_folder_has_subfolder_with_name (TnyFolderStore *parent, folder = (TnyFolder*)tny_iterator_get_current (iter); if (!folder || ! TNY_IS_FOLDER(folder)) { g_warning ("%s: invalid folder", __FUNCTION__); + tny_iterator_next (iter); continue; } @@ -436,6 +441,7 @@ modest_tny_folder_has_subfolder_with_name (TnyFolderStore *parent, if (!name) { g_warning ("%s: folder name == NULL", __FUNCTION__); g_object_unref (folder); + tny_iterator_next (iter); continue; }