From 12292111a8f5069e347decea79c55c161dd27fa9 Mon Sep 17 00:00:00 2001 From: SJ Date: Tue, 20 Dec 2016 20:14:05 +0100 Subject: [PATCH] final imap folder fix Change-Id: I8997496cf061b1b05c3992c02769c5280473872e Signed-off-by: SJ --- src/imap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/imap.c b/src/imap.c index 3e343c97..be903c00 100644 --- a/src/imap.c +++ b/src/imap.c @@ -443,6 +443,12 @@ int list_folders(int sd, int *seq, int use_ssl, char *folder_name, struct __data // trim the "A3 OK LIST completed" trailer off if(p) *p = '\0'; + // No folder list, so this must be a leaf folder + if(strlen(buf) == 0){ + addnode(data->imapfolders, folder_name); + return OK; + } + memset(attrs, 0, sizeof(attrs)); p = buf;