lib: replace deprecated xapian call 'flush()' with 'commit()'

This will make notmuch incompatible with Xapian before 1.1.0, which is
more than 6 years old this point.
This commit is contained in:
David Bremner 2016-10-05 08:34:33 -03:00
parent 8a82ad716f
commit 7f07a3f0ed

View file

@ -1711,7 +1711,7 @@ notmuch_database_end_atomic (notmuch_database_t *notmuch)
* However, we rely on flushing to test atomicity. */
const char *thresh = getenv ("XAPIAN_FLUSH_THRESHOLD");
if (thresh && atoi (thresh) == 1)
db->flush ();
db->commit ();
} catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch, "A Xapian exception occurred committing transaction: %s.\n",
error.get_msg().c_str());