]> granicus.if.org Git - neomutt/commitdiff
Fix browsing an IMAP backend
authorPietro Cerutti <gahr@gahr.ch>
Mon, 22 Jul 2019 11:37:23 +0000 (11:37 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 22 Jul 2019 11:53:21 +0000 (12:53 +0100)
Fixes #1783

imap/browse.c

index d9661aca612256eb66abc3dc16d814d4749f6021..edf0efa16459eda17215a22dd227033176b416f2 100644 (file)
@@ -121,7 +121,6 @@ static void add_folder(char delim, char *folder, bool noselect, bool noinferiors
     if (mutt_str_strcmp(tmp, mutt_b2s(np->mailbox->pathbuf)) == 0)
       break;
   }
-  neomutt_mailboxlist_clear(&ml);
 
   if (np)
   {
@@ -130,6 +129,7 @@ static void add_folder(char delim, char *folder, bool noselect, bool noinferiors
     (state->entry)[state->entrylen].msg_count = np->mailbox->msg_count;
     (state->entry)[state->entrylen].msg_unread = np->mailbox->msg_unread;
   }
+  neomutt_mailboxlist_clear(&ml);
 
   (state->entrylen)++;
 }