* modest-tny-account:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 1 Feb 2007 20:03:34 +0000 (20:03 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 1 Feb 2007 20:03:34 +0000 (20:03 +0000)
- really *ignore* the account param when getting local folders
  (this fixes a bug when moving folders to trash)
- fix a leak (the result of a _get_current of a tny-list should
   be unref'd)

pmo-trunk-r776

src/modest-tny-account.c

index 15b79c9..4053808 100644 (file)
@@ -62,7 +62,7 @@ modest_tny_account_get_special_folder (TnyAccount *account,
        folders = TNY_LIST (tny_simple_list_new ());
 
        /* no need to do this _async, as these are local folders */
-       tny_folder_store_get_folders (TNY_FOLDER_STORE (account),
+       tny_folder_store_get_folders (TNY_FOLDER_STORE (local_account),
                                      folders, NULL, NULL);
        iter = tny_list_create_iterator (folders);
 
@@ -73,6 +73,7 @@ modest_tny_account_get_special_folder (TnyAccount *account,
                        special_folder = folder;
                        break;
                }
+               g_object_unref (G_OBJECT(folder));
                tny_iterator_next (iter);
        }
        g_object_unref (G_OBJECT (folders));