IMAPX: Fix DELETED flag sync when using real Trash folder.
authorMatthew Barnes <mbarnes@redhat.com>
Wed, 19 Dec 2012 15:27:03 +0000 (10:27 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Wed, 19 Dec 2012 16:35:03 +0000 (11:35 -0500)
commit3005684a8e3ccfd11dcd053ce4e711a565785e38
treefd97c65f5b8a234113a5d5be57cf8e13bcc68007
parent3f4d4a793dbdc6dc9b298711ef4d72806e67519a
IMAPX: Fix DELETED flag sync when using real Trash folder.

After copying messages to a real Trash folder and then tagging them for
deletion, we immediately expunge.  Now the IMAPX expunge operation first
synchronizes message flags with the server, which is sensible.  But when
using a real Trash folder, this extra sync was causing deleted messages
to keep coming back from the grave like zombies.

The problem was when using a real Trash folder, the internal operation
that synchronizes flags first clears any DELETED flags.  Normally that's
what we want, except when we're about to expunge since expunging depends
on those DELETED flags.  So make an exception for this case.
camel/camel-imapx-server.c