]> Pileus Git - ~andy/fetchmail/commitdiff
Handle IMAP folder names with embedded spaces.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 14 Feb 2000 21:30:42 +0000 (21:30 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 14 Feb 2000 21:30:42 +0000 (21:30 -0000)
svn path=/trunk/; revision=2746

NEWS
imap.c

diff --git a/NEWS b/NEWS
index 2b00b395fa6907b793a8036da6cf4e2689de6dc4..6f60c008735ac559115f98bf0eda6f0df5e3d788 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@
 * Fix for NO response during SIZE fetches for M$ Exchange IMAP server.
 * Thomas Zajic <zlatko@gmx.at> sent a change that copes with GMX X-UIDLs.
 * Fix fetchmailconf's handling of ssl attributes when SSL is not configured.
+* Handle IMAP folder names with embedded spaces.
 
 fetchmail-5.2.7 (Sun Feb  6 20:45:41 EST 2000), 18517 lines:
 * Updated FAQ.
diff --git a/imap.c b/imap.c
index 34c4bf968321376b0b2233a6ed218277dbd7b12e..9aee018d43fd1b32021e43c9c0993cd89c98b452 100644 (file)
--- a/imap.c
+++ b/imap.c
@@ -1065,10 +1065,9 @@ static int imap_getrange(int sock,
     }
     else
     {
-       if (!check_only)
-           ok = gen_transact(sock, "SELECT %s", folder ? folder : "INBOX");
-       else
-           ok = gen_transact(sock, "EXAMINE %s", folder ? folder : "INBOX");
+       ok = gen_transact(sock, 
+                         check_only ? "EXAMINE \"%s\"" : "SELECT \"%s\"",
+                         folder ? folder : "INBOX");
        if (ok != 0)
        {
            report(stderr, _("mailbox selection failed\n"));