From ad811c27003b8e8ea0dbdba3cef61823a2497f26 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 11 Jun 2004 08:28:41 +0000 Subject: if we scan from "" or top == NULL, then we really want to scan from "." 2004-06-11 Not Zed * providers/local/camel-maildir-store.c (get_folder_info): if we scan from "" or top == NULL, then we really want to scan from "." instead. * camel-url.c (camel_url_new_with_base): don't check the for a character after the # before extracting the fragment. An empty fragment is still allowed and # should never be added to the path. See Rfc1808 2.4.1. svn path=/trunk/; revision=26304 --- camel/ChangeLog | 11 +++++++++++ camel/camel-url.c | 10 ++++++---- camel/providers/local/camel-maildir-store.c | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index cb94e4a994..a67f634255 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2004-06-11 Not Zed + + * providers/local/camel-maildir-store.c (get_folder_info): if we + scan from "" or top == NULL, then we really want to scan from "." + instead. + + * camel-url.c (camel_url_new_with_base): don't check the for a + character after the # before extracting the fragment. An empty + fragment is still allowed and # should never be added to the path. + See Rfc1808 2.4.1. + 2004-06-11 Jeffrey Stedfast * providers/imap4/camel-imap4-summary.c diff --git a/camel/camel-url.c b/camel/camel-url.c index cdbccfe14e..7033913ea0 100644 --- a/camel/camel-url.c +++ b/camel/camel-url.c @@ -65,11 +65,13 @@ camel_url_new_with_base (CamelURL *base, const char *url_string) * FUNCTION, RUN tests/misc/url AFTERWARDS. */ - /* Find fragment. */ + /* Find fragment. RFC 1808 2.4.1 */ end = hash = strchr (url_string, '#'); - if (hash && hash[1]) { - url->fragment = g_strdup (hash + 1); - camel_url_decode (url->fragment); + if (hash) { + if (hash[1]) { + url->fragment = g_strdup (hash + 1); + camel_url_decode (url->fragment); + } } else end = url_string + strlen (url_string); diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c index 5a81965ede..92375b99bc 100644 --- a/camel/providers/local/camel-maildir-store.c +++ b/camel/providers/local/camel-maildir-store.c @@ -420,7 +420,7 @@ get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelExcepti url = camel_url_new("maildir:", NULL); camel_url_set_path(url, ((CamelService *)local_store)->url->path); - if (scan_dir(store, visited, url, top?top:".", flags, NULL, &fi, ex) == -1 && fi != NULL) { + if (scan_dir(store, visited, url, top == NULL || top[0] == 0?".":top, flags, NULL, &fi, ex) == -1 && fi != NULL) { camel_store_free_folder_info_full(store, fi); fi = NULL; } -- cgit v1.2.3