]> granicus.if.org Git - mutt/commitdiff
Prevent mutt from re-reading IMAP folders before quitting.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 27 Oct 1998 09:40:36 +0000 (09:40 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 27 Oct 1998 09:40:36 +0000 (09:40 +0000)
imap.c
mutt.h
mx.c

diff --git a/imap.c b/imap.c
index 3135bff498918732cbfa737cfda8891d510ef1f7..72964d9ba7437f24e1b3cf49704539f362534189 100644 (file)
--- a/imap.c
+++ b/imap.c
@@ -756,7 +756,8 @@ static int imap_exec (char *buf, size_t buflen,
   }
   while (strncmp (buf, seq, SEQLEN) != 0);
 
-  if (CTX_DATA->status == IMAP_NEW_MAIL || CTX_DATA->status == IMAP_EXPUNGE)
+  if (!ctx->closing && 
+      (CTX_DATA->status == IMAP_NEW_MAIL || CTX_DATA->status == IMAP_EXPUNGE))
   {
 
     count = CTX_DATA->newMailCount;
diff --git a/mutt.h b/mutt.h
index 2f8415b182bc30a1eaf1b4a265ed107da9e017c0..a2de65fd231e4238e7a1d03f35f19d5528f24034 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -632,6 +632,7 @@ typedef struct
   unsigned int quiet : 1;      /* inhibit status messages? */
   unsigned int revsort : 1;    /* mailbox sorted in reverse? */
   unsigned int collapsed : 1;   /* are all threads collapsed? */
+  unsigned int closing : 1;    /* mailbox is being closed */
 } CONTEXT;
 
 typedef struct attachptr
diff --git a/mx.c b/mx.c
index 4f4d959470cd5bb1b47f51b22173103b60a97799..b1ed5c019538cbbca041db73a976be9b89bb4bf1 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -710,6 +710,8 @@ int mx_close_mailbox (CONTEXT *ctx)
   char mbox[_POSIX_PATH_MAX];
   char buf[SHORT_STRING];
 
+  ctx->closing = 1;
+
   if (ctx->readonly || ctx->dontwrite)
   {
     /* mailbox is readonly or we don't want to write */