X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-compact.c;h=cc45afa105992025bd94ac62056adb4f8b34cdb5;hp=f8996cf46039ea05cb2959ed2d153fc374d5f0eb;hb=12301392d492c07000abdcee84faa989d357331f;hpb=2f4beda434c59f9e2f5b7c32d26543bad7217ad4 diff --git a/notmuch-compact.c b/notmuch-compact.c index f8996cf4..cc45afa1 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@ -27,9 +27,9 @@ status_update_cb (const char *msg, unused (void *closure)) } int -notmuch_compact_command (notmuch_config_t *config, int argc, char *argv[]) +notmuch_compact_command (unused(notmuch_config_t *config), notmuch_database_t *notmuch, + int argc, char *argv[]) { - const char *path = notmuch_config_get_database_path (config); const char *backup_path = NULL; notmuch_status_t ret; bool quiet = false; @@ -55,8 +55,8 @@ notmuch_compact_command (notmuch_config_t *config, int argc, char *argv[]) if (! quiet) printf ("Compacting database...\n"); - ret = notmuch_database_compact (path, backup_path, - quiet ? NULL : status_update_cb, NULL); + ret = notmuch_database_compact_db (notmuch, backup_path, + quiet ? NULL : status_update_cb, NULL); if (ret) { fprintf (stderr, "Compaction failed: %s\n", notmuch_status_to_string (ret)); return EXIT_FAILURE;