From e851cec11e3556ae42ecd160f61b661b808d013c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 19 Aug 2002 13:28:10 +0000 Subject: If the passed-in URL contains a path, but the service doesn't allow paths, * camel-session.c (get_service): If the passed-in URL contains a path, but the service doesn't allow paths, then the path part must be a folder name, and we should ignore it here. #29010 svn path=/trunk/; revision=17797 --- camel/camel-session.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'camel/camel-session.c') diff --git a/camel/camel-session.c b/camel/camel-session.c index 4e74c1bd9e..4a93534d6f 100644 --- a/camel/camel-session.c +++ b/camel/camel-session.c @@ -425,6 +425,12 @@ get_service (CamelSession *session, const char *url_string, return NULL; } + /* If the provider doesn't use paths but the URL contains one, + * ignore it. + */ + if (url->path && !CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PATH)) + camel_url_set_path (url, NULL); + /* Now look up the service in the provider's cache */ service = g_hash_table_lookup (provider->service_cache[type], url); if (service != NULL) { -- cgit v1.2.3