<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] adds mbox_keep_mtime option



On 2004-03-21 02:10:14 +0100, Viktor Rosenfeld wrote:

> +  { "mbox_keep_mtime",       DT_BOOL, R_NONE, OPTMBOXKEEPMTIME, 0 },
> +  /*
> +  ** .pp
> +  ** If set, mutt will not change the the modification time of an mbox
> +  ** file if mails are only deleted from the file.  If unset, mutt will
> +  ** modify the modification time.  This is necessary for some version
> +  ** control systems such as svn, but may confuse some xbiff style mail
> +  ** checkers.
> +  */
>    { "mbox_type",     DT_MAGIC,R_NONE, UL &DefaultMagic, M_MBOX },
>    /*
>    ** .pp
> Nur in mutt-1.5.5.1.vrr/: .init.h.swo.
> diff -ur mutt-1.5.5.1/mbox.c mutt-1.5.5.1.vrr/mbox.c
> --- mutt-1.5.5.1/mbox.c       2003-11-05 10:41:32.000000000 +0100
> +++ mutt-1.5.5.1.vrr/mbox.c   2004-03-18 20:59:10.503128880 +0100
> @@ -935,10 +935,12 @@
>      return (-1);
>    }

> -  /* Restore the previous access/modification times */
> -  utimebuf.actime = statbuf.st_atime;
> -  utimebuf.modtime = statbuf.st_mtime;
> -  utime (ctx->path, &utimebuf);
> +  if (option(OPTMBOXKEEPMTIME)) {
> +    /* Restore the previous access/modification times */
> +    utimebuf.actime = statbuf.st_atime;
> +    utimebuf.modtime = statbuf.st_mtime;
> +    utime (ctx->path, &utimebuf);
> +  }

You wanted to say "if (!option (OPTMBOXKEEPMTIME))", didn't you? ;-)

-- 
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.