--- /dev/null
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 74095431FC4\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 13:58:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id S95sWqoc0-k8 for <notmuch@notmuchmail.org>;\r
+ Sun, 22 Nov 2009 13:58:31 -0800 (PST)\r
+X-Greylist: delayed 105285 seconds by postgrey-1.32 at olra;\r
+ Sun, 22 Nov 2009 13:58:31 PST\r
+Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7])\r
+ by olra.theworths.org (Postfix) with ESMTP id A88B2431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 13:58:31 -0800 (PST)\r
+Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com\r
+ [72.227.128.66])\r
+ (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)\r
+ by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id nAMLwUTn009370\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT)\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 16:58:31 -0500 (EST)\r
+Received: from jrollins by servo.finestructure.net with local (Exim 4.69)\r
+ (envelope-from <jrollins@finestructure.net>)\r
+ id 1NCKSE-0000Gt-IZ; Sun, 22 Nov 2009 16:58:46 -0500\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: notmuch@notmuchmail.org\r
+Date: Sun, 22 Nov 2009 16:58:35 -0500\r
+Message-Id: <1258927116-528-2-git-send-email-jrollins@finestructure.net>\r
+X-Mailer: git-send-email 1.6.5\r
+In-Reply-To: <1258927116-528-1-git-send-email-jrollins@finestructure.net>\r
+References: <1258927116-528-1-git-send-email-jrollins@finestructure.net>\r
+X-No-Spam-Score: Local\r
+X-Scanned-By: MIMEDefang 2.65 on 128.59.29.7\r
+Subject: [notmuch] [PATCH 2/3] modify notmuch_setup_command to return 1 if\r
+ config file write fails.\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 22 Nov 2009 21:58:32 -0000\r
+\r
+This fixes a small bug in notmuch_setup_command such that it returned\r
+OK and output the setup message footer even if the config file write\r
+step failed.\r
+---\r
+ notmuch-setup.c | 13 +++++++------\r
+ 1 files changed, 7 insertions(+), 6 deletions(-)\r
+\r
+diff --git a/notmuch-setup.c b/notmuch-setup.c\r
+index 482efd2..68788e1 100644\r
+--- a/notmuch-setup.c\r
++++ b/notmuch-setup.c\r
+@@ -155,10 +155,11 @@ notmuch_setup_command (unused (void *ctx),\r
+ notmuch_config_set_database_path (config, absolute_path);\r
+ }\r
+ \r
+- notmuch_config_save (config);\r
+-\r
+- if (is_new)\r
+- welcome_message_post_setup ();\r
+-\r
+- return 0;\r
++ if (! notmuch_config_save (config)) {\r
++ if (is_new)\r
++ welcome_message_post_setup ();\r
++ return 0;\r
++ } else {\r
++ return 1;\r
++ }\r
+ }\r
+-- \r
+1.6.5\r
+\r