diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-28 03:38:08 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-28 03:38:08 +0800 |
commit | f829289c850f79cd657d60e6b4bc5f9cd6aa0a70 (patch) | |
tree | a4d990e18f2fb1700365df692774ce6b84224190 /camel | |
parent | 16b12f579456ffe13e662f7aee841f9c325f34e9 (diff) | |
download | gsoc2013-evolution-f829289c850f79cd657d60e6b4bc5f9cd6aa0a70.tar.gz gsoc2013-evolution-f829289c850f79cd657d60e6b4bc5f9cd6aa0a70.tar.zst gsoc2013-evolution-f829289c850f79cd657d60e6b4bc5f9cd6aa0a70.zip |
Construct the source_url the right way. The previous way was generating
2002-03-27 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (camel_filter_driver_filter_folder):
Construct the source_url the right way. The previous way was
generating urls like pop://fejj@ximian.com;keep_on_server/inbox
which is wrong.
svn path=/trunk/; revision=16260
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 21 |
2 files changed, 21 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 44ce0175ed..d9699f385f 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2002-03-27 Jeffrey Stedfast <fejj@ximian.com> + + * camel-filter-driver.c (camel_filter_driver_filter_folder): + Construct the source_url the right way. The previous way was + generating urls like pop://fejj@ximian.com;keep_on_server/inbox + which is wrong. + 2002-03-26 Not Zed <NotZed@Ximian.com> * camel-text-index.c (text_index_normalise): Changed to use just diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index e696388586..9b62e119b5 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -965,20 +965,27 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folde const char *folder_name; int status = 0; int need_sep = 0; + CamelURL *url; int i; service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (folder))); + url = camel_url_new (service_url, NULL); + g_free (service_url); + folder_name = camel_folder_get_full_name (folder); - /* Add a separator unless the first char of folder_name or the last char of service_url is '/' */ - need_sep = (folder_name && *folder_name != '/'); - if (service_url && *service_url && !need_sep) { - need_sep = (service_url[strlen (service_url)-1] != '/'); + if (folder_name && *folder_name != '/') { + char *path; + + path = g_strdup_printf ("/%s", folder_name); + camel_url_set_path (url, path); + g_free (path); + } else { + camel_url_set_path (url, folder_name); } - source_url = g_strdup_printf ("%s%s%s", service_url, need_sep ? "/" : "", - folder_name); - g_free (service_url); + source_url = camel_url_to_string (url, CAMEL_URL_HIDE_ALL); + camel_url_free (url); if (uids == NULL) { uids = camel_folder_get_uids (folder); |