[haiku-commits] r40402 - haiku/trunk/src/kits/mail

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 9 Feb 2011 11:10:18 +0100 (CET)

Author: czeidler
Date: 2011-02-09 11:10:17 +0100 (Wed, 09 Feb 2011)
New Revision: 40402
Changeset: http://dev.haiku-os.org/changeset/40402

Modified:
   haiku/trunk/src/kits/mail/c_mail_api.cpp
Log:
Fix count_pop_accounts. Returns number of all accounts regardless if it is a 
pop account or not (as before and in the whole file)...



Modified: haiku/trunk/src/kits/mail/c_mail_api.cpp
===================================================================
--- haiku/trunk/src/kits/mail/c_mail_api.cpp    2011-02-09 09:58:00 UTC (rev 
40401)
+++ haiku/trunk/src/kits/mail/c_mail_api.cpp    2011-02-09 10:10:17 UTC (rev 
40402)
@@ -44,14 +44,8 @@
 _EXPORT int32
 count_pop_accounts(void)
 {
-       BPath path;
-       status_t status = find_directory(B_USER_SETTINGS_DIRECTORY,&path);
-       if (status < B_OK)
-               return 0;
-
-       path.Append("Mail/chains/inbound");
-       BDirectory dir(path.Path());
-       return dir.CountEntries();
+       BMailAccounts accounts;
+       return accounts.CountAccounts();
 }
 
 


Other related posts:

  • » [haiku-commits] r40402 - haiku/trunk/src/kits/mail - clemens . zeidler