]> git.notmuchmail.org Git - notmuch/commitdiff
lib: replace deprecated xapian call 'flush()' with 'commit()'
authorDavid Bremner <david@tethera.net>
Wed, 5 Oct 2016 11:34:33 +0000 (08:34 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 25 Oct 2016 21:13:52 +0000 (18:13 -0300)
This will make notmuch incompatible with Xapian before 1.1.0, which is
more than 6 years old this point.

lib/database.cc

index f0bfe5667fba4736996583830047d7529cd390fc..2d19f20c4b5e5d6c75518942917d4550a4891dcb 100644 (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());