+2009-04-08 16:25 +0200 Rocco Rutte <pdmef@gmx.net> (5b631ee33281)
+
+ * hdrline.c: For %F, display Bcc recipient if no other recipients
+ found. Closes #3157.
+
+2009-04-08 15:46 +0200 Rocco Rutte <pdmef@gmx.net> (41786fbb344b)
+
+ * ChangeLog, UPDATING, doc/manual.xml.head, doc/muttrc.man.head,
+ pattern.c: Make ~x match In-Reply-To, too. Closes #771.
+
2009-04-07 19:57 +0200 Rocco Rutte <pdmef@gmx.net> (667b0006b586)
* sendlib.c: Fix b5cbd0dab863, closes #3215.
return rc;
}
+void mutt_buffy_cleanup (const char *buf, struct stat *st)
+{
+ struct utimbuf ut;
+ BUFFY *tmp;
+
+ if (option(OPTCHECKMBOXSIZE))
+ {
+ tmp = mutt_find_mailbox (buf);
+ if (tmp && !tmp->new)
+ mutt_update_mailbox (tmp);
+ }
+ else
+ {
+ /* fix up the times so buffy won't get confused */
+ if (st->st_mtime > st->st_atime)
+ {
+ ut.actime = st->st_atime;
+ ut.modtime = time (NULL);
+ utime (buf, &ut);
+ }
+ else
+ utime (buf, NULL);
+ }
+}
+
BUFFY *mutt_find_mailbox (const char *path)
{
BUFFY *tmp = NULL;
BUFFY *mutt_find_mailbox (const char *path);
void mutt_update_mailbox (BUFFY * b);
+
+/* fixes up atime + mtime after mbox/mmdf mailbox was modified
+ according to stat() info taken before a modification */
+void mutt_buffy_cleanup (const char *buf, struct stat *st);
char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX];
CONTEXT ctx;
struct stat st;
- BUFFY *tmp = NULL;
- struct utimbuf ut;
*redraw = 0;
mx_close_mailbox (&ctx, NULL);
if (need_buffy_cleanup)
- {
- if (option(OPTCHECKMBOXSIZE))
- {
- tmp = mutt_find_mailbox (buf);
- if (tmp && !tmp->new)
- mutt_update_mailbox (tmp);
- }
- else
- {
- /* fix up the times so buffy won't get confused */
- if (st.st_mtime > st.st_atime)
- {
- ut.actime = st.st_atime;
- ut.modtime = time (NULL);
- utime (buf, &ut);
- }
- else
- utime (buf, NULL);
- }
- }
+ mutt_buffy_cleanup (ctx.path, &st);
mutt_clear_error ();
return (0);
#include "charset.h"
#include "mutt_crypt.h"
#include "mutt_idna.h"
+#include "buffy.h"
#include <string.h>
#include <stdlib.h>
MESSAGE *msg;
char tempfile[_POSIX_PATH_MAX];
FILE *tempfp = NULL;
- int r;
+ int r, need_buffy_cleanup = 0;
+ struct stat st;
if (post)
set_noconv_flags (hdr->content, 1);
mx_close_mailbox (&f, NULL);
return (-1);
}
+ /* remember new mail status before appending message */
+ need_buffy_cleanup = 1;
+ stat (path, &st);
}
hdr->read = !post; /* make sure to put it in the `cur' directory (maildir) */
mx_close_message (&msg);
mx_close_mailbox (&f, NULL);
+ if (!post && need_buffy_cleanup)
+ mutt_buffy_cleanup (path, &st);
+
if (post)
set_noconv_flags (hdr->content, 0);