[evolution-data-server] Bug 691466 - Cache reaper restores old IMAP cache directories



commit 3ff0b7854514639a8f8f740ec892b7e71c3b6912
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Jan 10 07:03:11 2013 -0500

    Bug 691466 - Cache reaper restores old IMAP cache directories
    
    Alter the name of the cache directory when moving it to trash.

 ...olution-source-registry-migrate-imap-to-imapx.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/services/evolution-source-registry/evolution-source-registry-migrate-imap-to-imapx.c b/services/evolution-source-registry/evolution-source-registry-migrate-imap-to-imapx.c
index 4bfb237..dd95d4e 100644
--- a/services/evolution-source-registry/evolution-source-registry-migrate-imap-to-imapx.c
+++ b/services/evolution-source-registry/evolution-source-registry-migrate-imap-to-imapx.c
@@ -35,6 +35,7 @@ evolution_source_registry_migrate_imap_to_imapx (ESourceRegistryServer *server,
 	GHashTable *settings;
 	const gchar *group_name;
 	gboolean backend_is_imap;
+	gchar *trash_name;
 	gchar *cache_dir;
 	gchar *trash_dir;
 	gchar *value;
@@ -127,8 +128,13 @@ evolution_source_registry_migrate_imap_to_imapx (ESourceRegistryServer *server,
 
 	cache_dir = g_build_filename (
 		e_get_user_cache_dir (), "mail", uid, NULL);
+
+	/* Alter the name of the target directory so
+	 * the cache reaper module does not restore it. */
+	trash_name = g_strdup_printf ("%s_old_imap", uid);
 	trash_dir = g_build_filename (
-		e_get_user_cache_dir (), "mail", "trash", uid, NULL);
+		e_get_user_cache_dir (), "mail", "trash", trash_name, NULL);
+	g_free (trash_name);
 
 	if (g_rename (cache_dir, trash_dir) == -1) {
 		g_warning (



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