]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-storage: Don't reset mail_save_context.saving too early.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 29 Sep 2016 11:15:32 +0000 (14:15 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 29 Sep 2016 11:22:49 +0000 (14:22 +0300)
commit05150df8fbda6b8fdfafcfb0aa9003f1da4ecaca
tree78900b0da72833aa75496faa739c5c5574e73e13
parentfe9459ab43300c912dc4b16b8872411337f3a25f
lib-storage: Don't reset mail_save_context.saving too early.

If mailbox_save_using_mail() ended up in mail_storage_copy(), saving was set
to FALSE before the copy() method was finished running. This caused e.g.
notify plugin to think that this was a copy event instead of a save event.

Added comments and asserts to clarify how the logic should work between
all the different copying/moving/saving flags.
src/lib-storage/mail-copy.c
src/lib-storage/mail-storage-private.h
src/lib-storage/mail-storage.c