diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-27 16:17:22 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-27 16:17:22 -0700 |
commit | 854f82fb91ef9560259e4597d475747e948204d5 (patch) | |
tree | 1c21fcf9c099ad29264244f3bd07d47cf2fd7679 /database.cc | |
parent | b0190e59ac14851a0b79a00d58aad2e8febea92f (diff) |
notmuch_database_close: Explicitly flush the Xapian database.
This would have helped with the recent bug causing "notmuch new"
to not record any results in the database. I'm not sure why
the explicit flush would be required, (shouldn't the destructor
always ensure that things flush?), but perhaps some outstanding
references from the leak prevented that.
In any case, an explicit flush on close() seems to make sense.
Diffstat (limited to 'database.cc')
-rw-r--r-- | database.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/database.cc b/database.cc index 9831d79c..8d477eca 100644 --- a/database.cc +++ b/database.cc @@ -505,6 +505,8 @@ notmuch_database_open (const char *path) void notmuch_database_close (notmuch_database_t *notmuch) { + notmuch->xapian_db->flush (); + delete notmuch->query_parser; delete notmuch->xapian_db; talloc_free (notmuch); |