]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-restore.c
emacs: correct `notmuch-search-mode's docstring wrt `notmuch-search-tag-all'
[notmuch] / notmuch-restore.c
index 02b563caae2dcbd5d52d223cf3ef6db4c2739d88..08d5adcbe42271a1660bb56079c488052b5ab520 100644 (file)
@@ -115,15 +115,14 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
     if (config == NULL)
        return 1;
 
-    notmuch = notmuch_database_open (notmuch_config_get_database_path (config),
-                                    NOTMUCH_DATABASE_MODE_READ_WRITE);
-    if (notmuch == NULL)
+    if (notmuch_database_open (notmuch_config_get_database_path (config),
+                              NOTMUCH_DATABASE_MODE_READ_WRITE, &notmuch))
        return 1;
 
     synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config);
 
     notmuch_opt_desc_t options[] = {
-       { NOTMUCH_OPT_POSITION, &input_file_name, 0, 0, 0 },
+       { NOTMUCH_OPT_STRING, &input_file_name, "input", 'i', 0 },
        { NOTMUCH_OPT_BOOLEAN,  &accumulate, "accumulate", 'a', 0 },
        { 0, 0, 0, 0, 0 }
     };