From: Gary Johnson Date: Fri, 31 Aug 2007 17:12:18 +0000 (-0700) Subject: Decrement the mtime of the tempfile during edit-message to make mutt X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=014d3414285e18544e1660035ffc4aeec30ffb90;p=neomutt Decrement the mtime of the tempfile during edit-message to make mutt notice changes taking less than one second. --- diff --git a/ChangeLog b/ChangeLog index 98218d4c0..fa17e5947 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2007-08-28 10:43 -0700 Brendan Cully (3cc89213ebb7) +2007-08-28 11:33 -0700 Brendan Cully (3f8829e739e9) + + * init.h: Insert .pp after .de to fix man page generation (closes + #2940) + + * imap/imap.c: Check subscriptions after any authentication, + rather than after fist connection (closes #2908) * dotlock.c, lib.h, mutt.h: Use limits.h for PATH_MAX instead of posix1_lim.h (closes #2525) diff --git a/editmsg.c b/editmsg.c index 672997397..e6c603f52 100644 --- a/editmsg.c +++ b/editmsg.c @@ -91,8 +91,11 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur) goto bail; } - if (stat (tmp, &sb) == 0) - mtime = sb.st_mtime; + if ((rc = stat (tmp, &sb)) == -1) + { + mutt_error (_("Can't stat %s: %s"), tmp, strerror (errno)); + goto bail; + } /* * 2002-09-05 me@sigpipe.org @@ -109,6 +112,8 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur) goto bail; } + mtime = mutt_decrease_mtime (tmp, &sb); + mutt_edit_file (NONULL(Editor), tmp); if ((rc = stat (tmp, &sb)) == -1)