[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] What am I doing wrong: refile -retainsequences, when s
Re: [Nmh-workers] What am I doing wrong: refile -retainsequences, when src and destination are the sane directory
Sun, 03 Aug 2014 07:42:57 -0700
David Levine <address@hidden> writes:
>> It looks like the only true solution would be to have refile recognize
>> the special case where the source and destination folder are the same
>> and use the same structure for both.
>Agreed, and I just committed that. Let me explain what I did so
>that it can be readily reviewed, because this change affects the
>operation of refile(1) even without -retainsequences.
>All of the changes are in uip/refile.c. There are two
>1) If the source and destination folder are the same, instead of
>calling folder_read() on both, just copy the result of
>folder_read() on the source folder to the destination
>folder's folders entry (fp->f_mp in the loop). Simple
>2) If the source and destination folder are the same, don't
>indicate that the new message is selected so that 1)
>folder_delmsgs() doesn't delete it later and 2) it is not
>reflected in mp->hghsel, and therefore won't be assigned to
>be the current message.
>This happens after the message has been copied to its
>destination, so selecting the message would only affect
>whether or not it's to be deleted and removed from sequences.
Thank you very much.
Would it work if I just replaced the old nmh-1.6/uip/refile.c with the one
implementing the bug fix and then rebuilt? If so, would you tell me how to get
the new new refile.c ?