diff options
author | Dan Winship <danw@src.gnome.org> | 2001-03-27 13:23:12 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-03-27 13:23:12 +0800 |
commit | 0b8af6dc0a87c119bf91b7aa62157d627cf573d0 (patch) | |
tree | 7fd8c2988838b2c3cc199cca972e7120a63cddca | |
parent | 3843c543887502716379e29149d6b805766fec03 (diff) | |
download | gsoc2013-evolution-0b8af6dc0a87c119bf91b7aa62157d627cf573d0.tar gsoc2013-evolution-0b8af6dc0a87c119bf91b7aa62157d627cf573d0.tar.gz gsoc2013-evolution-0b8af6dc0a87c119bf91b7aa62157d627cf573d0.tar.bz2 gsoc2013-evolution-0b8af6dc0a87c119bf91b7aa62157d627cf573d0.tar.lz gsoc2013-evolution-0b8af6dc0a87c119bf91b7aa62157d627cf573d0.tar.xz gsoc2013-evolution-0b8af6dc0a87c119bf91b7aa62157d627cf573d0.tar.zst gsoc2013-evolution-0b8af6dc0a87c119bf91b7aa62157d627cf573d0.zip |
Kludge, copied+modified from mail_config_folder_to_cachename to deal with
* mail-ops.c (uid_cachename_hack): Kludge, copied+modified from
mail_config_folder_to_cachename to deal with the different
behavior of the URL code now. Will go away when the keep-on-server
code moves.
(get_folderinfo_get): Only pass "subscribed_only" to
camel_store_get_folder_info if the store supports subscriptions...
svn path=/trunk/; revision=8970
-rw-r--r-- | mail/mail-ops.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index e2a4bc8db0..7b1e8adcf4 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -28,6 +28,7 @@ #include <config.h> #include <errno.h> +#include <gal/util/e-util.h> #include <camel/camel-mime-filter-from.h> #include <camel/camel-operation.h> #include "mail.h" @@ -249,6 +250,25 @@ void mail_filter_on_demand(CamelFolder *folder, GPtrArray *uids) /* ********************************************************************** */ +/* Temporary workaround for various issues. Gone before 0.11 */ +static char * +uid_cachename_hack (CamelStore *store) +{ + CamelURL *url = CAMEL_SERVICE (store)->url; + char *encoded_url, *filename; + + encoded_url = g_strdup_printf ("pop://%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/config/cache-%s", evolution_dir, encoded_url); + g_free (encoded_url); + + return filename; +} + static void fetch_mail_fetch(struct _mail_msg *mm) { @@ -289,7 +309,7 @@ fetch_mail_fetch(struct _mail_msg *mm) CamelUIDCache *cache = NULL; char *cachename; - cachename = mail_config_folder_to_cachename (folder, "cache-"); + cachename = uid_cachename_hack (folder->parent_store); cache = camel_uid_cache_new (cachename); g_free (cachename); @@ -973,7 +993,7 @@ static void get_folderinfo_get(struct _mail_msg *mm) struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm; camel_operation_register(mm->cancel); - m->info = camel_store_get_folder_info(m->store, NULL, FALSE, TRUE, TRUE, &mm->ex); + m->info = camel_store_get_folder_info(m->store, NULL, FALSE, TRUE, camel_store_supports_subscriptions(m->store), &mm->ex); if (m->info && m->info->url) add_vtrash_info (m->info); camel_operation_unregister(mm->cancel); |