From 846acd9b6f846f58a2e2f79d1ff1cbc83ed8a347 Mon Sep 17 00:00:00 2001 From: SJ Date: Thu, 22 Dec 2016 11:29:55 +0100 Subject: [PATCH] folder trim fix Change-Id: I3afce82b84bff4b8e24c52babf79666bfbc904b4 Signed-off-by: SJ --- src/imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imap.c b/src/imap.c index 1ca8bd0e..e534c425 100644 --- a/src/imap.c +++ b/src/imap.c @@ -129,7 +129,7 @@ int process_imap_folder(int sd, int *seq, char *folder, char *main_folder, struc if(data->recursive_folder_names == 1){ // trim the main folder name from the stored value in folder table - if(data->import->trim_folder_name == 1 && main_folder){ + if(data->import->trim_folder_name == 1 && main_folder && strlen(main_folder) < strlen(folder)){ folder += strlen(main_folder); }