diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-09-23 06:35:10 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-09-23 06:35:10 +0800 |
commit | 0960633750653e6192986b3657eaf051cdf62174 (patch) | |
tree | 7e67e77382a9673886c439962476642d40a0af32 /camel/providers | |
parent | b41b85209fa0c88142a77b719041dcd101876f1d (diff) | |
download | gsoc2013-evolution-0960633750653e6192986b3657eaf051cdf62174.tar.gz gsoc2013-evolution-0960633750653e6192986b3657eaf051cdf62174.tar.zst gsoc2013-evolution-0960633750653e6192986b3657eaf051cdf62174.zip |
Again...wrap the folder names in quotes
2000-09-22 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_message_count_internal): Again...wrap the folder names
in quotes
* providers/imap/camel-imap-store.c (imap_folder_exists): Wrap the
mailbox name in the LIST command in quotes just in case the folder
has spaces in the name.
(imap_create): Again, wrap folder name in quotes.
(check_current_folder): Same...
* providers/imap/camel-imap-utils.c (imap_parse_list_response):
Update to unquote mailbox if it's quoted (allows us to get folders
with spaces in the name).
svn path=/trunk/; revision=5556
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 4 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 6 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-utils.c | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 7d744d701d..9664dab008 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -314,10 +314,10 @@ imap_get_message_count_internal (CamelFolder *folder, CamelException *ex) if (store->has_status_capability) status = camel_imap_command_extended (store, folder, &result, ex, - "STATUS %s (MESSAGES)", folder_path); + "STATUS \"%s\" (MESSAGES)", folder_path); else status = camel_imap_command_extended (store, folder, &result, ex, - "EXAMINE %s", folder_path); + "EXAMINE \"%s\"", folder_path); g_free (folder_path); diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 853059b618..b6748f62cc 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -345,7 +345,7 @@ imap_folder_exists (CamelImapStore *store, const char *folder_path, gboolean *se *selectable = FALSE; status = camel_imap_command_extended (CAMEL_IMAP_STORE (store), NULL, - &result, ex, "LIST \"\" %s", folder_path); + &result, ex, "LIST \"\" \"%s\"", folder_path); if (status != CAMEL_IMAP_OK) { g_free (result); return FALSE; @@ -375,7 +375,7 @@ imap_create (CamelImapStore *store, const char *folder_path, CamelException *ex) gint status; status = camel_imap_command_extended (store, NULL, NULL, ex, - "CREATE %s", folder_path); + "CREATE \"%s\"", folder_path); return status == CAMEL_IMAP_OK; } @@ -495,7 +495,7 @@ check_current_folder (CamelImapStore *store, CamelFolder *folder, char *fmt, Cam return CAMEL_IMAP_OK; folder_path = camel_imap_store_folder_path (store, folder->full_name); - status = camel_imap_command_extended (store, NULL, NULL, ex, "SELECT %s", folder_path); + status = camel_imap_command_extended (store, NULL, NULL, ex, "SELECT \"%s\"", folder_path); g_free (folder_path); if (status != CAMEL_IMAP_OK) { diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c index 8fdc4fb5b4..925ae13891 100644 --- a/camel/providers/imap/camel-imap-utils.c +++ b/camel/providers/imap/camel-imap-utils.c @@ -36,13 +36,13 @@ char * imap_next_word (char *buf) { char *word; - + /* skip over current word */ for (word = buf; *word && *word != ' '; word++); - + /* skip over white space */ for ( ; *word && *word == ' '; word++); - + return word; } @@ -92,6 +92,7 @@ imap_parse_list_response (char *buf, char *namespace, char **flags, char **sep, word = imap_next_word (word); *folder = g_strdup (word); g_strstrip (*folder); + string_unquote (*folder); /* chop out the folder prefix */ if (*namespace && !strncmp (*folder, namespace, strlen (namespace))) { |