From: Brendan Cully Date: Sat, 5 Aug 2006 00:19:38 +0000 (+0000) Subject: Don't allow user to attempt to delete root IMAP folder. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d621002c542416ac85b80438ef65116116a0071;p=neomutt Don't allow user to attempt to delete root IMAP folder. --- diff --git a/browser.c b/browser.c index bb709a86d..073a5fa7e 100644 --- a/browser.c +++ b/browser.c @@ -909,8 +909,13 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num char msg[SHORT_STRING]; IMAP_MBOX mx; int nentry = menu->current; - + imap_parse_path (state.entry[nentry].name, &mx); + if (!mx.mbox) + { + mutt_error _("Cannot delete root folder"); + break; + } snprintf (msg, sizeof (msg), _("Really delete mailbox \"%s\"?"), mx.mbox); if (mutt_yesorno (msg, M_NO) == M_YES)