]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-search.c
Permit opening the notmuch database in read-only mode.
[notmuch] / notmuch-search.c
index 2b1c0fea950d01ae0c37e30accfc1256cd0c5f93..cde97351b493514228ca7e2df69c5d5a65ca1eac 100644 (file)
@@ -129,7 +129,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
     if (config == NULL)
        return 1;
 
-    notmuch = notmuch_database_open (notmuch_config_get_database_path (config));
+    notmuch = notmuch_database_open (notmuch_config_get_database_path (config),
+                                    NOTMUCH_DATABASE_MODE_READONLY);
     if (notmuch == NULL)
        return 1;