X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-restore.c;h=1a81212f0f9810e4db2cb6b07a832b1bc9f1ce2f;hb=57c62c3aeb7cbc61b42e4919230e8f0d77101055;hp=ce07f89d927931e1dbb570197e27fb61ccb96ce1;hpb=66adcd4f538d426205fd09b0f97b63c74e9e82d7;p=notmuch diff --git a/notmuch-restore.c b/notmuch-restore.c index ce07f89d..1a81212f 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -219,7 +219,7 @@ parse_sup_line (void *ctx, char *line, } int -notmuch_restore_command (unused(notmuch_config_t *config), notmuch_database_t *notmuch, int argc, char *argv[]) +notmuch_restore_command (notmuch_database_t *notmuch, int argc, char *argv[]) { bool accumulate = false; tag_op_flag_t flags = 0; @@ -343,7 +343,8 @@ notmuch_restore_command (unused(notmuch_config_t *config), notmuch_database_t *n if (ret) goto DONE; } - if ((include & DUMP_INCLUDE_PROPERTIES) && line_len >= 2 && line[0] == '#' && line[1] == '=') { + if ((include & DUMP_INCLUDE_PROPERTIES) && line_len >= 2 && line[0] == '#' && line[1] == + '=') { ret = process_properties_line (notmuch, line + 2); if (ret) goto DONE; @@ -360,6 +361,7 @@ notmuch_restore_command (unused(notmuch_config_t *config), notmuch_database_t *n } char *p; + for (p = line; (input_format == DUMP_FORMAT_AUTO) && *p; p++) { if (*p == '(') input_format = DUMP_FORMAT_SUP; @@ -382,7 +384,8 @@ notmuch_restore_command (unused(notmuch_config_t *config), notmuch_database_t *n line_ctx = talloc_new (notmuch); - if ((include & DUMP_INCLUDE_PROPERTIES) && line_len >= 2 && line[0] == '#' && line[1] == '=') { + if ((include & DUMP_INCLUDE_PROPERTIES) && line_len >= 2 && line[0] == '#' && line[1] == + '=') { ret = process_properties_line (notmuch, line + 2); if (ret) goto DONE;