From ef1343ef4852c47a15fc31fc9962737940af090b Mon Sep 17 00:00:00 2001 From: jsuto Date: Wed, 1 Jan 2025 11:19:12 +0100 Subject: [PATCH] Reimplemented -f for pilerimport (#221) Signed-off-by: Janos SUTO --- src/import_imap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/import_imap.c b/src/import_imap.c index fdda66d8..033b382b 100644 --- a/src/import_imap.c +++ b/src/import_imap.c @@ -103,6 +103,13 @@ struct FolderList* list_folders_curl(CURL *curl, struct data *data){ char buf[MAXBUFSIZE]; char *p = chunk.memory; + if(data->import->folder_imap){ + char tmpbuf[SMALLBUFSIZE]; + + snprintf(tmpbuf, sizeof(tmpbuf)-1, "* LIST (\\HasNoChildren) \".\" \"%s\"\r\n", data->import->folder_imap); + p = tmpbuf; + } + do { memset(buf, 0, sizeof(buf)); p = split(p, '\n', buf, sizeof(buf)-1, &rc);