From: Thomas Roessler Date: Sun, 28 Oct 2001 19:46:43 +0000 (+0000) Subject: Fix 839 X-Git-Tag: mutt-1-3-23-1-rel~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8669fd8e6e333af265cce280023aa0fd45c62cb1;p=mutt Fix 839 --- diff --git a/imap/browse.c b/imap/browse.c index e7d029df..f72cf4a0 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -214,6 +214,12 @@ int imap_browse (char* path, struct browser_state* state) if (browse_add_list_result (idata, buf, state, 0)) goto fail; + if (!state->entrylen) + { + mutt_error _("No such folder"); + goto fail; + } + mutt_clear_error (); qsort(&(state->entry[nsup]),state->entrylen-nsup,sizeof(state->entry[0]), diff --git a/imap/imap.c b/imap/imap.c index ede06b8f..add039c6 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1308,8 +1308,12 @@ int imap_subscribe (char *path, int subscribe) char mbox[LONG_STRING]; IMAP_MBOX mx; - if (imap_parse_path (path, &mx)) + if (!mx_is_imap (path) || imap_parse_path (path, &mx)) + { + mutt_error ("Bad mailbox name"); return -1; + } + if (!(idata = imap_conn_find (&(mx.account), 0))) goto fail;