X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fbrowse.c;h=fd9c4730e467e205cfaa4f4ebeae1604fe316d81;hp=0f23e2190ec0a7767985c9a7259c43fbe4614ea2;hb=adbac5bafc8f1ebe348b38342ace473f128d762a;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258;ds=sidebyside diff --git a/imap/browse.c b/imap/browse.c index 0f23e21..fd9c473 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -23,6 +23,8 @@ #include "lib/debug.h" #include "mutt.h" +#include "ascii.h" +#include "enter.h" #include "imap_private.h" /* -- forward declarations -- */ @@ -60,6 +62,7 @@ int imap_browse (char *path, struct browser_state *state) short showparents = 0; int noselect; int noinferiors; + int save_lsub; IMAP_MBOX mx; if (imap_parse_path (path, &mx)) { @@ -67,6 +70,8 @@ int imap_browse (char *path, struct browser_state *state) return -1; } + save_lsub = option (OPTIMAPCHECKSUBSCRIBED); + unset_option (OPTIMAPCHECKSUBSCRIBED); strfcpy (list_cmd, option (OPTIMAPLSUB) ? "LSUB" : "LIST", sizeof (list_cmd)); @@ -223,10 +228,15 @@ int imap_browse (char *path, struct browser_state *state) } } + if (save_lsub) + set_option (OPTIMAPCHECKSUBSCRIBED); + mem_free (&mx.mbox); return 0; fail: + if (save_lsub) + set_option (OPTIMAPCHECKSUBSCRIBED); mem_free (&mx.mbox); return -1; }