aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
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;