aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-01-08 06:12:43 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-01-08 06:12:43 +0800
commitfc863cbedf2998f93b1518bac7ce2243a1468372 (patch)
tree40c46b39bea162beaf52b502157a75295eca96f5 /mail/mail-ops.c
parentc18d2cf2ea3fe844dcc4d86558dda949e4d2bd59 (diff)
downloadgsoc2013-evolution-fc863cbedf2998f93b1518bac7ce2243a1468372.tar
gsoc2013-evolution-fc863cbedf2998f93b1518bac7ce2243a1468372.tar.gz
gsoc2013-evolution-fc863cbedf2998f93b1518bac7ce2243a1468372.tar.bz2
gsoc2013-evolution-fc863cbedf2998f93b1518bac7ce2243a1468372.tar.lz
gsoc2013-evolution-fc863cbedf2998f93b1518bac7ce2243a1468372.tar.xz
gsoc2013-evolution-fc863cbedf2998f93b1518bac7ce2243a1468372.tar.zst
gsoc2013-evolution-fc863cbedf2998f93b1518bac7ce2243a1468372.zip
Don't migrate stuff here anymore.
2004-01-07 Jeffrey Stedfast <fejj@ximian.com> * mail-component.c (mail_component_init): Don't migrate stuff here anymore. * mail-ops.c (uid_cachename_hack): Removed a hack that checked for the really old uid cache location and make the uid cache live in a better location (why have mail/pop/<account> and mail/pop3/cache-<account>? simply put the cache file in mail/pop/<account>/uid-cache). * em-migrate.c (em_migrate_dir): When copying over mbox folders, don't abort if we fail to copy over a summary file (big whoop). Also, if indexing was turned on in the evolution 1.4 version of the folder, turn on indexing for that folder in the migrated mbox folder as well. (em_migrate_pop_uid_caches): Migrate the pop3 uid-cache files. Fixes bug #52464. (em_migrate): Call em_migrate_pop_uid_caches(). svn path=/trunk/; revision=24094
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c31
1 files changed, 5 insertions, 26 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 1f5e75cb42..32eb68b4f1 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -221,38 +221,17 @@ static char *
uid_cachename_hack (CamelStore *store)
{
CamelURL *url = CAMEL_SERVICE (store)->url;
- char *encoded_url, *filename, *old_location;
- struct stat st;
+ char *encoded_url, *filename;
+ const char *evolution_dir;
- encoded_url = g_strdup_printf ("pop://%s%s%s@%s/", url->user,
+ encoded_url = g_strdup_printf ("%s%s%s@%s", url->user,
url->authmech ? ";auth=" : "",
url->authmech ? url->authmech : "",
url->host);
e_filename_make_safe (encoded_url);
- filename = g_strdup_printf ("%s/mail/pop3/cache-%s",
- mail_component_peek_base_directory (mail_component_peek ()), encoded_url);
-
- /* lame hack, but we can't expect user's to actually migrate
- their cache files - brain power requirements are too
- high. */
- if (stat (filename, &st) == -1) {
- /* This is either the first time the user has checked
- mail with this POP provider or else their cache
- file is in the old location... */
- old_location = g_strdup_printf ("%s/config/cache-%s",
- mail_component_peek_base_directory (mail_component_peek ()),
- encoded_url);
- if (stat (old_location, &st) == -1) {
- /* old location doesn't exist either so use the new location */
- g_free (old_location);
- } else {
- /* old location exists, so I guess we use the old cache file location */
- g_free (filename);
- filename = old_location;
- }
- }
-
+ evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
+ filename = g_build_filename (evolution_dir, "mail", "pop", encoded_url, "uid-cache", NULL);
g_free (encoded_url);
return filename;