]> granicus.if.org Git - mutt/commitdiff
Fix 839
authorThomas Roessler <roessler@does-not-exist.org>
Sun, 28 Oct 2001 19:46:43 +0000 (19:46 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sun, 28 Oct 2001 19:46:43 +0000 (19:46 +0000)
imap/browse.c
imap/imap.c

index e7d029df92be960b9b17553b8639e18f2be21f1b..f72cf4a0373df90bbd2aa8461eba3b8cf427b10e 100644 (file)
@@ -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]),
index ede06b8f810fb6af3c53a688d2e5f46d8385f93c..add039c6444b57a931bcad4393d3b528d2a20bde 100644 (file)
@@ -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;