X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=notmuch-dump.c;h=845a67e22247332cc834f159985b249773d437ea;hb=e76f6517de020783d828be59f461f1d4f465c4b4;hp=5bbda3609d632938a33149ddd6ce5898f3f623cd;hpb=d08c714b6a172cf0018bee4f60aff069d5508d4e;p=notmuch diff --git a/notmuch-dump.c b/notmuch-dump.c index 5bbda360..845a67e2 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -20,6 +20,7 @@ #include "notmuch-client.h" #include "dump-restore-private.h" +#include "string-util.h" int notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) @@ -33,7 +34,7 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) notmuch_tags_t *tags; const char *query_str = ""; - config = notmuch_config_open (ctx, NULL, NULL); + config = notmuch_config_open (ctx, NULL, FALSE); if (config == NULL) return 1; @@ -144,13 +145,13 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) if (output_format == DUMP_FORMAT_SUP) { fputs (")\n", output); } else { - if (hex_encode (notmuch, message_id, - &buffer, &buffer_size) != HEX_SUCCESS) { - fprintf (stderr, "Error: failed to hex-encode msg-id %s\n", - message_id); + if (make_boolean_term (notmuch, "id", message_id, + &buffer, &buffer_size)) { + fprintf (stderr, "Error quoting message id %s: %s\n", + message_id, strerror (errno)); return 1; } - fprintf (output, " -- id:%s\n", buffer); + fprintf (output, " -- %s\n", buffer); } notmuch_message_destroy (message);