From 850190587ff71010fc63e44ca01a93a44c96f58e Mon Sep 17 00:00:00 2001 From: c_14 Date: Mon, 1 Oct 2018 16:01:52 +0200 Subject: [PATCH] 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. --- uip/new.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 1.7.10.4