X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=2d19f20c4b5e5d6c75518942917d4550a4891dcb;hp=392e8b2869842130e1372b52d5d9329d0151577e;hb=7f07a3f0edd225a2d07086251d60d87d41c87ef5;hpb=693ca8d8a80438ce1e361e7e6d22288f52a11c55 diff --git a/lib/database.cc b/lib/database.cc index 392e8b28..2d19f20c 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1143,7 +1143,6 @@ notmuch_database_close (notmuch_database_t *notmuch) return status; } -#if HAVE_XAPIAN_COMPACT static int unlink_cb (const char *path, unused (const struct stat *sb), @@ -1327,17 +1326,6 @@ notmuch_database_compact (const char *path, return ret; } -#else -notmuch_status_t -notmuch_database_compact (unused (const char *path), - unused (const char *backup_path), - unused (notmuch_compact_status_cb_t status_cb), - unused (void *closure)) -{ - _notmuch_database_log (notmuch, "notmuch was compiled against a xapian version lacking compaction support.\n"); - return NOTMUCH_STATUS_UNSUPPORTED_OPERATION; -} -#endif notmuch_status_t notmuch_database_destroy (notmuch_database_t *notmuch) @@ -1685,8 +1673,8 @@ notmuch_database_begin_atomic (notmuch_database_t *notmuch) notmuch->atomic_nesting > 0) goto DONE; - if (notmuch_database_needs_upgrade(notmuch)) - return NOTMUCH_STATUS_UPGRADE_REQUIRED; + if (notmuch_database_needs_upgrade (notmuch)) + return NOTMUCH_STATUS_UPGRADE_REQUIRED; try { (static_cast (notmuch->xapian_db))->begin_transaction (false); @@ -1723,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());