diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-08-26 01:17:08 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-08-26 01:17:08 +0800 |
commit | f75bb1e1c94412cd0d190ac5409a383a76339cb4 (patch) | |
tree | 6213b5c663fe43da29333e0aa435150ed42957cc /camel | |
parent | 0a45b2998b757513847fd35aa88396a88d3aac8a (diff) | |
download | gsoc2013-evolution-f75bb1e1c94412cd0d190ac5409a383a76339cb4.tar.gz 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')
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 38 |
2 files changed, 38 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index cc7ea92a4b..d1aabc69c0 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +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) + 2000-08-24 Lauris Kaplinski <lauris@helixcode.com> * camel-folder-summary.c (summary_build_content_info): 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, |