]> git.cworth.org Git - obsolete/notmuch-old/commit
lib: Remove message document directly after removing the last file name.
authorAustin Clements <amdragon@mit.edu>
Sat, 11 Jun 2011 04:07:54 +0000 (00:07 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 24 Sep 2011 01:50:39 +0000 (21:50 -0400)
commitbfe4555325086d5cb99e3962424128f94d1c921d
tree6f77de81be15220f0ffc2a4f44b92d462dbe57bc
parente4379c43e21ff69dcdb66064fe3de83ae0642fc0
lib: Remove message document directly after removing the last file name.

Previously, notmuch_database_remove_message would remove the message
file name, sync the change to the message document, re-find the
message document, and then delete it if there were no more file names.
An interruption after sync'ing would result in a file-name-less,
permanently un-removable zombie message that would produce errors and
odd results in searches.  We could wrap this in an atomic section, but
it's much simpler to eliminate the round-about approach and just
delete the message document instead of sync'ing it if we removed the
last filename.
lib/database.cc
lib/message.cc
lib/notmuch-private.h