[notmuch] [PATCH 4/4] Prompt for database location in notmuch setup

David Benjamin davidben at MIT.EDU
Tue Feb 23 18:23:03 PST 2010


Signed-off-by: David Benjamin <davidben at mit.edu>
---
 notmuch-setup.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/notmuch-setup.c b/notmuch-setup.c
index 622bbaa..e3c8465 100644
--- a/notmuch-setup.c
+++ b/notmuch-setup.c
@@ -159,6 +159,15 @@ notmuch_setup_command (unused (void *ctx),
 	notmuch_config_set_database_path (config, absolute_path);
     }
 
+    prompt ("Location for notmuch database [%s]: ",
+	    notmuch_config_get_database_notmuch_path (config));
+    if (strlen (response)) {
+	const char *absolute_path;
+
+	absolute_path = make_path_absolute (ctx, response);
+	notmuch_config_set_database_notmuch_path (config, absolute_path);
+    }
+
     if (! notmuch_config_save (config)) {
 	if (is_new)
 	  welcome_message_post_setup ();
-- 
1.7.0.18.g39b3



More information about the notmuch mailing list