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
This commit is contained in:
David Bremner 2020-07-07 07:56:45 -03:00
parent a962842d9b
commit a1b7cc834b

View file

@ -1281,11 +1281,7 @@ notmuch_database_compact (const char *path,
try { try {
NotmuchCompactor compactor (status_cb, closure); NotmuchCompactor compactor (status_cb, closure);
notmuch->xapian_db->compact (compact_xapian_path, Xapian::DBCOMPACT_NO_RENUMBER, 0, compactor);
compactor.set_renumber (false);
compactor.add_source (xapian_path);
compactor.set_destdir (compact_xapian_path);
compactor.compact ();
} catch (const Xapian::Error &error) { } catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch, "Error while compacting: %s\n", error.get_msg ().c_str ()); _notmuch_database_log (notmuch, "Error while compacting: %s\n", error.get_msg ().c_str ());
ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION; ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;