mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
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:
parent
a962842d9b
commit
a1b7cc834b
1 changed files with 1 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue