aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-restore.c
diff options
context:
space:
mode:
authorGravatar Chris Wilson <chris@chris-wilson.co.uk>2009-11-21 19:54:25 +0000
committerGravatar Carl Worth <cworth@cworth.org>2009-11-21 22:04:49 +0100
commitf379aa52845f5594aa6cc2e7cf131d5f57202bbf (patch)
tree1befbaa8796388c58fd40459ea42b93881af008e /notmuch-restore.c
parentaac1d6035238f6a2b18c0dc0d7a5190a2187c511 (diff)
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 <chris@chris-wilson.co.uk> Acked-by: Carl Worth <cworth@cworth.org>
Diffstat (limited to 'notmuch-restore.c')
-rw-r--r--notmuch-restore.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch-restore.c b/notmuch-restore.c
index b8f99a39..001f3fcb 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -36,7 +36,8 @@ 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 = notmuch_database_open (notmuch_config_get_database_path (config),
+ NOTMUCH_DATABASE_MODE_WRITABLE);
if (notmuch == NULL)
return 1;