From a1b7cc834bf559184113c837f7511125db18a1aa Mon Sep 17 00:00:00 2001 From: David Bremner Date: Tue, 7 Jul 2020 07:56:45 -0300 Subject: [PATCH] lib: migrate to post Xapian 1.3.4 compact support The old API was deprecated in Xapian 1.3.4 and (will be) removed in 1.5.0 --- lib/database.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 78b5fec9..43bfac4e 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1281,11 +1281,7 @@ notmuch_database_compact (const char *path, try { NotmuchCompactor compactor (status_cb, closure); - - compactor.set_renumber (false); - compactor.add_source (xapian_path); - compactor.set_destdir (compact_xapian_path); - compactor.compact (); + notmuch->xapian_db->compact (compact_xapian_path, Xapian::DBCOMPACT_NO_RENUMBER, 0, compactor); } catch (const Xapian::Error &error) { _notmuch_database_log (notmuch, "Error while compacting: %s\n", error.get_msg ().c_str ()); ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;