From: pdmef Date: Sat, 11 Feb 2006 23:36:46 +0000 (+0000) Subject: - decrease file size when truncating it for editing so detecting changes works again... X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=d903a73d430f5b445ab8caa50a72bb2f575d79fe - decrease file size when truncating it for editing so detecting changes works again (fixes bug #6000) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@781 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/VERSION.svn b/VERSION.svn index d2d648e..394a6cf 100644 --- a/VERSION.svn +++ b/VERSION.svn @@ -1 +1 @@ -780 +781 diff --git a/editmsg.c b/editmsg.c index a11a5e4..529838c 100644 --- a/editmsg.c +++ b/editmsg.c @@ -95,7 +95,7 @@ static int edit_one_message (CONTEXT * ctx, HEADER * cur) * remove it, the message will grow by one line each time the user edits * the message. */ - if (sb.st_size != 0 && truncate (tmp, sb.st_size - 1) == -1) { + if (size != 0 && truncate (tmp, --size) == -1) { mutt_error (_("could not truncate temporary mail folder: %s"), strerror (errno)); goto bail;