~emersion/public-inbox

1

Re: [PATCH go-maildir] Implement Copy function

Details
Message ID
<BVSKBWU18B7K.3L53UENUPROG6@jupiter.local>
DKIM signature
pass
Download raw message
On Thu Jul 25, 2019 at 5:42 PM Simon Ser wrote:
> I've been wondering whether this should be part of go-maildir.
> Probably, because we don't want the destination to see the copy as a
> new message.

Yeah. Currently, aerc implements the copy operation by just making a new
delivery, but that is a bit of a hack because as you mentioned, it ends
up going into new so the flags disappear and there's not really a good
way to copy them over.

> One could first try to os.Link, and then fallback to a manual copy if
> that fails with EXDEV.

I had considered that, but decided against it in order to reduce the
number of code paths. Happy to use this approach if you'd prefer,
however.

Let me know how you'd like to proceed with this, and in either case I'll
send a v2 addressing your remaining feedback.

Thanks!

Re: [PATCH go-maildir] Implement Copy function

Details
Message ID
<5m4toNkTDjAQ_vjASXqc5kulRszvRBgSTQTPIRbTIIyggG5J0Owgcl6OYtAin30EIVmYYl27EJczZ1hrb0ud2Qn_J2AlHqZPM2Q3TEFscDQ=@emersion.fr>
In-Reply-To
<BVSKBWU18B7K.3L53UENUPROG6@jupiter.local> (view parent)
DKIM signature
pass
Download raw message
On Thursday, July 25, 2019 9:51 PM, Ben Burwell <ben@benburwell.com> wrote:

> On Thu Jul 25, 2019 at 5:42 PM Simon Ser wrote:
>
> > I've been wondering whether this should be part of go-maildir.
> > Probably, because we don't want the destination to see the copy as a
> > new message.
>
> Yeah. Currently, aerc implements the copy operation by just making a new
> delivery, but that is a bit of a hack because as you mentioned, it ends
> up going into new so the flags disappear and there's not really a good
> way to copy them over.

Hence this patch, I see.

> > One could first try to os.Link, and then fallback to a manual copy if
> > that fails with EXDEV.
>
> I had considered that, but decided against it in order to reduce the
> number of code paths. Happy to use this approach if you'd prefer,
> however.
>
> Let me know how you'd like to proceed with this, and in either case I'll
> send a v2 addressing your remaining feedback.

I guess it's not strictly necessary I'm okay with either, no big deal.

> Thanks!

Thank you for the patch!