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



commit cb27dbca4e5174865ed779731318b9047a37346c
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]