From f379aa52845f5594aa6cc2e7cf131d5f57202bbf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 21 Nov 2009 19:54:25 +0000 Subject: Permit opening the notmuch database in read-only mode. We only rarely need to actually open the database for writing, but we always create a Xapian::WritableDatabase. This has the effect of preventing searches and like whilst updating the index. Signed-off-by: Chris Wilson Acked-by: Carl Worth --- notmuch-show.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'notmuch-show.c') diff --git a/notmuch-show.c b/notmuch-show.c index a21d223c..a764e443 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -220,7 +220,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) 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; -- cgit v1.2.3