]> granicus.if.org Git - curl/commitdiff
imap: Fixed SELECT not being performed for custom requests
authorSteve Holme <steve_holme@hotmail.com>
Thu, 7 Mar 2013 22:56:19 +0000 (22:56 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Thu, 7 Mar 2013 22:56:19 +0000 (22:56 +0000)
lib/imap.c

index 48b4309cbf0dcc9692e20b89aa702c8ff53dd9e7..2ca87b8a0daf01d13dbfaa998148738dafa95c61 100644 (file)
@@ -1873,7 +1873,7 @@ static CURLcode imap_perform(struct connectdata *conn, bool *connected,
   else if(!imap->custom && selected && imap->uid)
     /* FETCH from the same mailbox */
     result = imap_fetch(conn);
-  else if(imap->uid)
+  else if(imap->mailbox && !selected && (imap->custom || imap->uid))
     /* SELECT the mailbox */
     result = imap_select(conn);
   else