diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-06-08 08:41:40 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-06-08 08:41:40 +0800 |
commit | 853f81994e2d19f166b111ee426e7200efafdd0d (patch) | |
tree | 8eec864f348650aaf79bad6a59b3526b0150fcc5 /camel | |
parent | 47326377225c125b5fca37759faacfad1c75f20a (diff) | |
download | gsoc2013-evolution-853f81994e2d19f166b111ee426e7200efafdd0d.tar gsoc2013-evolution-853f81994e2d19f166b111ee426e7200efafdd0d.tar.gz gsoc2013-evolution-853f81994e2d19f166b111ee426e7200efafdd0d.tar.bz2 gsoc2013-evolution-853f81994e2d19f166b111ee426e7200efafdd0d.tar.lz gsoc2013-evolution-853f81994e2d19f166b111ee426e7200efafdd0d.tar.xz gsoc2013-evolution-853f81994e2d19f166b111ee426e7200efafdd0d.tar.zst gsoc2013-evolution-853f81994e2d19f166b111ee426e7200efafdd0d.zip |
Add a separator between the service url and the folder name, if needed.
2001-06-07 Jon Trowbridge <trow@ximian.com>
* camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
separator between the service url and the folder name, if needed.
svn path=/trunk/; revision=10153
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 3 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 11f3b4c433..d4f1d375bc 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,8 @@ 2001-06-07 Jon Trowbridge <trow@ximian.com> + * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a + separator between the service url and the folder name, if needed. + * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added an argument, so that the original source URI of the mbox can be passed in. This is needed because this function is called diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index d70798f6f2..83cfb92221 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -732,10 +732,22 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folde CamelMimeMessage *message; CamelMessageInfo *info; char *source_url, *service_url; + const char *folder_name; int status = 0; + int need_sep = 0; service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (folder))); - source_url = g_strdup_printf ("%s%s", service_url, camel_folder_get_full_name (folder)); + 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] != '/'); + } + source_url = g_strdup_printf ("%s%s%s", + service_url, + need_sep ? "/" : "", + folder_name); g_free (service_url); if (uids == NULL) { |