[PATCH 2/3] lib: migrate to post Xapian 1.3.4 compact support
David Bremner
david at tethera.net
Sun Apr 14 05:44:44 PDT 2019
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 09ab9cb0..bad6df5f 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1197,11 +1197,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;
--
2.20.1
More information about the notmuch
mailing list