X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=3dfea0f4f9e27b48de199ed539f0d58e8614b684;hp=06f1c0a18043e2551c56290265a461f742ed39f5;hb=8e4e537ceefec51fc811d0be3027572a904ba38c;hpb=0bd11b654e048a2ba562137c76d51296808b1a5d diff --git a/lib/database.cc b/lib/database.cc index 06f1c0a1..3dfea0f4 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -864,7 +864,6 @@ notmuch_database_compact (const char* path, notmuch_compact_status_cb_t status_cb) { void *local = talloc_new (NULL); - NotmuchCompactor compactor(status_cb); char *notmuch_path, *xapian_path, *compact_xapian_path; char *old_xapian_path = NULL; notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS; @@ -910,6 +909,8 @@ notmuch_database_compact (const char* path, } try { + NotmuchCompactor compactor(status_cb); + compactor.set_renumber(false); compactor.add_source(xapian_path); compactor.set_destdir(compact_xapian_path); @@ -944,7 +945,9 @@ DONE: } #else notmuch_status_t -notmuch_database_compact_close (unused (notmuch_database_t *notmuch)) +notmuch_database_compact (unused (const char* path), + unused (const char* backup_path), + unused (notmuch_compact_status_cb_t status_cb)) { fprintf (stderr, "notmuch was compiled against a xapian version lacking compaction support.\n"); return NOTMUCH_STATUS_UNSUPPORTED_OPERATION;