Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 16716 invoked from network); 5 Oct 2009 15:35:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Oct 2009 15:35:36 -0000 Received: (qmail 26396 invoked by uid 500); 5 Oct 2009 15:35:36 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 26361 invoked by uid 500); 5 Oct 2009 15:35:35 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 26352 invoked by uid 99); 5 Oct 2009 15:35:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 15:35:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 15:35:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 05D2423888FE; Mon, 5 Oct 2009 15:34:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r821856 - /couchdb/trunk/src/couchdb/couch_config_writer.erl Date: Mon, 05 Oct 2009 15:34:41 -0000 To: commits@couchdb.apache.org From: jchris@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091005153442.05D2423888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jchris Date: Mon Oct 5 15:34:41 2009 New Revision: 821856 URL: http://svn.apache.org/viewvc?rev=821856&view=rev Log: friendlier error message on bad log config file permissions Modified: couchdb/trunk/src/couchdb/couch_config_writer.erl Modified: couchdb/trunk/src/couchdb/couch_config_writer.erl URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_config_writer.erl?rev=821856&r1=821855&r2=821856&view=diff ============================================================================== --- couchdb/trunk/src/couchdb/couch_config_writer.erl (original) +++ couchdb/trunk/src/couchdb/couch_config_writer.erl Mon Oct 5 15:34:41 2009 @@ -55,7 +55,10 @@ NewFileContents2 end, - ok = file:write_file(File, list_to_binary(NewFileContents)), + case file:write_file(File, list_to_binary(NewFileContents)) of + ok -> ok; + _Else -> throw({permissions_error, <<"Config file is not writeable.">>}) + end, ok. %% @doc Iterates over the lines of an ini file and replaces or adds a new