aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/notmuch-private.h
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@mit.edu>2011-06-11 00:07:54 -0400
committerGravatar David Bremner <bremner@debian.org>2011-09-23 21:50:39 -0400
commitbfe4555325086d5cb99e3962424128f94d1c921d (patch)
tree6f77de81be15220f0ffc2a4f44b92d462dbe57bc /lib/notmuch-private.h
parente4379c43e21ff69dcdb66064fe3de83ae0642fc0 (diff)
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.
Diffstat (limited to 'lib/notmuch-private.h')
-rw-r--r--lib/notmuch-private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
index 02e24ee8..d3195305 100644
--- a/lib/notmuch-private.h
+++ b/lib/notmuch-private.h
@@ -293,6 +293,9 @@ _notmuch_message_set_date (notmuch_message_t *message,
void
_notmuch_message_sync (notmuch_message_t *message);
+notmuch_status_t
+_notmuch_message_delete (notmuch_message_t *message);
+
void
_notmuch_message_close (notmuch_message_t *message);