#include "lib/debug.h"
#include "mutt.h"
+#include "ascii.h"
+#include "enter.h"
#include "imap_private.h"
/* -- forward declarations -- */
short showparents = 0;
int noselect;
int noinferiors;
+ int save_lsub;
IMAP_MBOX mx;
if (imap_parse_path (path, &mx)) {
return -1;
}
+ save_lsub = option (OPTIMAPCHECKSUBSCRIBED);
+ unset_option (OPTIMAPCHECKSUBSCRIBED);
strfcpy (list_cmd, option (OPTIMAPLSUB) ? "LSUB" : "LIST",
sizeof (list_cmd));
}
}
- FREE (&mx.mbox);
+ if (save_lsub)
+ set_option (OPTIMAPCHECKSUBSCRIBED);
+
+ mem_free (&mx.mbox);
return 0;
fail:
- FREE (&mx.mbox);
+ if (save_lsub)
+ set_option (OPTIMAPCHECKSUBSCRIBED);
+ mem_free (&mx.mbox);
return -1;
}
mutt_sleep (0);
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return 0;
fail:
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return -1;
}
mutt_message (_("Mailbox renamed."));
mutt_sleep (0);
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return 0;
fail:
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return -1;
}
do {
if (imap_parse_list_response (idata, &name, &noselect, &noinferiors,
&idata->delim) != 0) {
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return -1;
}
}
while ((ascii_strncmp (idata->cmd.buf, idata->cmd.seq, SEQLEN) != 0));
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return 0;
}
imap_unmunge_mbox_name (folder);
if (state->entrylen + 1 == state->entrymax) {
- safe_realloc (&state->entry,
+ mem_realloc (&state->entry,
sizeof (struct folder_file) * (state->entrymax += 256));
memset (state->entry + state->entrylen, 0,
(sizeof (struct folder_file) *
* than at scan, since it's so expensive to scan. But that's big changes
* to browser.c */
if (!((regexec (Mask.rx, relpath, 0, NULL, 0) == 0) ^ Mask.not)) {
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return;
}
(state->entry)[state->entrylen].inferiors = !noinferiors;
(state->entrylen)++;
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
}
static int compare_names (struct folder_file *a, struct folder_file *b)