[evolution-data-server/email-factory] Save POP uids per very 10 downloaded mails. If we loose the list, we'd have to download again.



commit 939631f8779b4b2dd82c25fa486ffef1e63af060
Author: Srinivasa Ragavan <srini linux intel com>
Date:   Thu Jun 16 14:38:05 2011 +0300

    Save POP uids per very 10 downloaded mails. If we loose the list, we'd have to download again.

 camel/camel-filter-driver.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 3539278..c06d960 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -1403,8 +1403,11 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver,
 			camel_folder_set_message_flags (folder, uids->pdata[i],
 							CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN, ~0);
 
-		if (cache)
+		if (cache) {
 			camel_uid_cache_save_uid (cache, uids->pdata[i]);
+			if (i%10 == 0)
+				camel_uid_cache_save (cache); /* Save list every 10 mails */
+		}
 	}
 
 	if (p->defaultfolder) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]