aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/providers/imap/camel-imap-folder.c4
-rw-r--r--camel/providers/imap/camel-imap-store.c6
-rw-r--r--camel/providers/imap/camel-imap-utils.c7
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))) {