tttm

git clone https://orangeshoelaces.net/git/tttm.git

3a182eae888328459d99d18f24fee048580647e6

Author: Vasily Kolobkov on 05/22/2016

Committer: Vasily Kolobkov on 05/22/2016

Don't clobber errors in SELECT

Stats

imap.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Patch

diff --git a/imap.c b/imap.c
index 8222e8e..5f9d7c2 100644
--- a/imap.c
+++ b/imap.c
@@ -101,10 +101,11 @@ imap_select(struct imapctx *con, const char *mb)
 		dig_unsol(con, 1, &e);
 	}
 
-	if (!exists)
-		goto eproto;
-	if (!e)
+	if (!e) {
+		if (!exists)
+			goto eproto;
 		con->state = IS_SEL;
+	}
  exit:
 	return e;
  eout: