aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-26 01:17:08 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-26 01:17:08 +0800
commitf75bb1e1c94412cd0d190ac5409a383a76339cb4 (patch)
tree6213b5c663fe43da29333e0aa435150ed42957cc /camel/providers
parent0a45b2998b757513847fd35aa88396a88d3aac8a (diff)
downloadgsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.tar
gsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.tar.gz
gsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.tar.bz2
gsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.tar.lz
gsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.tar.xz
gsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.tar.zst
gsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.zip
If the url path is "/" and the folder path is "/", just LIST "" "*" (this
2000-08-25 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): If the url path is "/" and the folder path is "/", just LIST "" "*" (this should fix some cyrus imapd problems) svn path=/trunk/; revision=5036
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-folder.c38
1 files changed, 31 insertions, 7 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 5730002af4..72c04d972e 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -158,13 +158,14 @@ camel_imap_folder_get_type (void)
static CamelType camel_imap_folder_type = CAMEL_INVALID_TYPE;
if (camel_imap_folder_type == CAMEL_INVALID_TYPE) {
- camel_imap_folder_type = camel_type_register (CAMEL_FOLDER_TYPE, "CamelImapFolder",
- sizeof (CamelImapFolder),
- sizeof (CamelImapFolderClass),
- (CamelObjectClassInitFunc) camel_imap_folder_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imap_folder_init,
- (CamelObjectFinalizeFunc) imap_finalize);
+ camel_imap_folder_type =
+ camel_type_register (CAMEL_FOLDER_TYPE, "CamelImapFolder",
+ sizeof (CamelImapFolder),
+ sizeof (CamelImapFolderClass),
+ (CamelObjectClassInitFunc) camel_imap_folder_class_init,
+ NULL,
+ (CamelObjectInitFunc) camel_imap_folder_init,
+ (CamelObjectFinalizeFunc) imap_finalize);
}
return camel_imap_folder_type;
@@ -744,6 +745,8 @@ imap_get_subfolder_names_internal (CamelFolder *folder, CamelException *ex)
dir_sep = CAMEL_IMAP_STORE (folder->parent_store)->dir_sep;
+#if 0
+ /* this is the old code, the new code hasn't been tested */
if (url && url->path) {
if (!strcmp (folder->full_name, url->path + 1))
namespace = g_strdup (url->path + 1);
@@ -754,6 +757,27 @@ imap_get_subfolder_names_internal (CamelFolder *folder, CamelException *ex)
} else {
namespace = g_strdup (folder->full_name);
}
+#endif
+
+ if (url && url->path) {
+ char *path = url->path + 1;
+
+ if (*path) {
+ if (!strcmp (folder->full_name, path))
+ namespace = g_strdup (path);
+ else if (!strcmp (folder->full_name, "INBOX"))
+ namespace = g_strdup (path); /* FIXME: erm...not sure */
+ else
+ namespace = g_strdup_printf ("%s%s%s", path, dir_sep, folder->full_name);
+ } else {
+ if (!strcmp (folder->full_name, "/"))
+ namespace = g_strdup ("");
+ else
+ namespace = g_strdup (folder->full_name);
+ }
+ } else {
+ namespace = g_strdup (folder->full_name);
+ }
status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), NULL,
&result, "LIST \"\" \"%s%s*\"", namespace,