From: Brendan Cully Date: Mon, 5 Jan 2009 23:34:43 +0000 (-0800) Subject: Leave error message on screen if imap_mailbox_create fails X-Git-Tag: neomutt-20160307~800 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc96c11655e19a0213b3714bccd2dd58b7873f34;p=neomutt Leave error message on screen if imap_mailbox_create fails --- diff --git a/ChangeLog b/ChangeLog index 1bcd805a6..012bc173b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-05 12:19 -0800 Brendan Cully (1cdc8d64b55c) + + * doc/mutt.man: Add pointer to the full manual to the front of mutt.1 + +2009-01-05 09:16 -0800 Petr Písař (990f1e841dd4) + + * po/cs.po: Updated Czech translation + 2009-01-04 22:36 -0800 Vincent Lefevre (9af288ee9e91) * po/fr.po: Updated French translation diff --git a/browser.c b/browser.c index b50210d31..7026f5f75 100644 --- a/browser.c +++ b/browser.c @@ -875,19 +875,22 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num mutt_error (_("Create is only supported for IMAP mailboxes")); else { - imap_mailbox_create (LastDir); - /* TODO: find a way to detect if the new folder would appear in - * this window, and insert it without starting over. */ - destroy_state (&state); - init_state (&state, NULL); - state.imap_browse = 1; - imap_browse (LastDir, &state); - browser_sort (&state); - menu->data = state.entry; - menu->current = 0; - menu->top = 0; - init_menu (&state, menu, title, sizeof (title), buffy); - MAYBE_REDRAW (menu->redraw); + if (!imap_mailbox_create (LastDir)) + { + /* TODO: find a way to detect if the new folder would appear in + * this window, and insert it without starting over. */ + destroy_state (&state); + init_state (&state, NULL); + state.imap_browse = 1; + imap_browse (LastDir, &state); + browser_sort (&state); + menu->data = state.entry; + menu->current = 0; + menu->top = 0; + init_menu (&state, menu, title, sizeof (title), buffy); + MAYBE_REDRAW (menu->redraw); + } + /* else leave error on screen */ } break;