summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-10 07:03:11 -0500
committerMatthew Barnes <mbarnes@redhat.com>2013-01-10 07:05:37 -0500
commit3ff0b7854514639a8f8f740ec892b7e71c3b6912 (patch)
tree88ecaa16c802bf096792c2a327440962351ded82 /services
parent705af70540ee7b87b2d66228a0cd6c50c2538210 (diff)
downloadevolution-data-server-3ff0b7854514639a8f8f740ec892b7e71c3b6912.tar.gz
Bug 691466 - Cache reaper restores old IMAP cache directories
Alter the name of the cache directory when moving it to trash.
Diffstat (limited to 'services')
-rw-r--r--services/evolution-source-registry/evolution-source-registry-migrate-imap-to-imapx.c8
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 4bfb2375a..dd95d4e7a 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 (