[PATCH 2/4] lib: migrate to post Xapian 1.3.4 compact support
David Bremner
david at tethera.net
Wed May 22 19:00:07 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 1753117f..e4f38d6a 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1211,11 +1211,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