src: imap folder fix

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2017-08-08 16:04:54 +02:00
parent 950211687f
commit ac3ae0e2f3

View File

@ -418,10 +418,10 @@ int list_folders(struct data *data){
memset(buf, 0, len); memset(buf, 0, len);
snprintf(tag, sizeof(tag)-1, "A%d", data->import->seq); snprintf(tagok, sizeof(tagok)-1, "A%d OK", (data->import->seq)++); snprintf(tag, sizeof(tag)-1, "A%d", data->import->seq); snprintf(tagok, sizeof(tagok)-1, "A%d OK", (data->import->seq)++);
if(data->import->folder_name == NULL) if(data->import->folder_imap == NULL)
snprintf(puf, sizeof(puf)-1, "%s LIST \"\" \"*\"\r\n", tag); snprintf(puf, sizeof(puf)-1, "%s LIST \"\" \"*\"\r\n", tag);
else else
snprintf(puf, sizeof(puf)-1, "%s LIST \"%s\" \"*\"\r\n", tag, data->import->folder_name); snprintf(puf, sizeof(puf)-1, "%s LIST \"%s\" \"*\"\r\n", tag, data->import->folder_imap);
write1(data->net, puf, strlen(puf)); write1(data->net, puf, strlen(puf));