From: c_14 Date: Mon, 1 Oct 2018 14:01:52 +0000 (+0200) Subject: Ignore folders with an empty sequence in new X-Git-Tag: mmh-0.4~22 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=850190587ff71010fc63e44ca01a93a44c96f58e;p=mmh Ignore folders with an empty sequence in new This solves the issue where `new' lists folders that have an empty sequence (e.g. the unseen sequence), this also prevents `fnext' and `fprev' from navigating to such folders. --- diff --git a/uip/new.c b/uip/new.c index 9763376..21435b3 100644 --- a/uip/new.c +++ b/uip/new.c @@ -121,7 +121,10 @@ get_msgnums(char *folder, char *sequences[]) */ if (seq_in_list(f.name, sequences)) { this_msgnums = trimcpy(f.value); - if (msgnums == NULL) { + if (strlen(this_msgnums) == 0) { + free(this_msgnums); + continue; + } else if (msgnums == NULL) { msgnums = this_msgnums; } else { old_msgnums = msgnums;