Ignore folders with an empty sequence in new
[mmh] / uip / new.c
index 9763376..21435b3 100644 (file)
--- 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;