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

Re: bug: incorrect conversion from MMDF to mbox



* Sun Jul 24 2005 Brendan Cully <brendan@xxxxxxxxxx>
> On Saturday, 23 July 2005 at 21:04, Brendan Cully wrote:
> > On Tuesday, 31 May 2005 at 21:34, TAKAHASHI Tamotsu wrote:
> > > * Wed May 11 2005 William Lovas <wlovas@xxxxxxxxxxxxxxxx>
> > > > I've encountered a bug in mutt versions 1.4i and 1.5.6i: if you load an
> > > > MMDF mailbox with no "From ..." lines and try to save the messages to an
> > > > mbox mailbox -- i.e. with mbox_type=mbox -- mutt will create invalid 
> > > > mbox
> > > > mailboxes by not inserting any "From ..." lines.
> > > 
> > > As MMDF doesn't require "From " line, mutt should use M_ADD_FROM flag:
> > > 
> > > +++ copy.c        Tue May 31 21:24:55 2005
> > > @@ -704,7 +704,7 @@
> > >    MESSAGE *msg;
> > >    int r;
> > >  
> > > -  if ((msg = mx_open_new_message (dest, hdr, (src->magic == M_MBOX || 
> > > src->magic == M_MMDF) ? 0 : M_ADD_FROM)) == NULL)
> > > +  if ((msg = mx_open_new_message (dest, hdr, (src->magic == M_MBOX) ? 0 
> > > : M_ADD_FROM)) == NULL)
> > >      return -1;
> > >    if (dest->magic == M_MBOX || dest->magic == M_MMDF)
> > >      chflags |= CH_FROM | CH_FORCE_FROM;
> > 
> > Won't this produce two from lines in the case that the MMDF folder
> > DOES have a From line? In particular, I wonder whether copying
> > messages back and forth between an mbox and mmdf folder might produce
> > different messages.
> 
> The attached patch should work better.

Yes.
Moving messages from box to box I found no problem
with your patch.

My patch didn't care about an existing "From "-line.
Moreover, I didn't know "is_from()" function at all.
Thanks a lot for the better patch!

-- 
tamo