From 8e0b2de5fd09ed1fee962aa236e14726d686df26 Mon Sep 17 00:00:00 2001 From: Mikhail Efremov Date: Thu, 30 Jan 2014 20:41:00 +0400 Subject: [PATCH] imap: Quote mailbox name. A mailbox name can include space characters, so it should be quoted. See RFC 3501 for details. --- libmailwatch-core/mailwatch-mailbox-imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmailwatch-core/mailwatch-mailbox-imap.c b/libmailwatch-core/mailwatch-mailbox-imap.c index 78cc7c1..61051d4 100644 --- a/libmailwatch-core/mailwatch-mailbox-imap.c +++ b/libmailwatch-core/mailwatch-mailbox-imap.c @@ -555,7 +555,7 @@ imap_check_mailbox(XfceMailwatchIMAPMailbox *imailbox, TRACE("entering, folder %s", mailbox_name); /* ask the server to look at the mailbox */ - g_snprintf(buf, sizeof(buf), "%05d STATUS %s (UNSEEN)\r\n", + g_snprintf(buf, sizeof(buf), "%05d STATUS \"%s\" (UNSEEN)\r\n", ++imailbox->imap_tag, mailbox_name); if(imap_send(imailbox, net_conn, buf) != (gint)strlen(buf)) -- 1.8.4.5