couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r804828 - /couchdb/trunk/src/couchdb/couch_config_writer.erl
Date Mon, 17 Aug 2009 02:35:39 GMT
Author: davisp
Date: Mon Aug 17 02:35:39 2009
New Revision: 804828

URL: http://svn.apache.org/viewvc?rev=804828&view=rev
Log:
Fixed a re:run/3 call in couch_config_writer.erl


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=804828&r1=804827&r2=804828&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_config_writer.erl (original)
+++ couchdb/trunk/src/couchdb/couch_config_writer.erl Mon Aug 17 02:35:39 2009
@@ -136,11 +136,11 @@
 %% @doc Tries to match a line against a pattern specifying a ini module or
 %%      section ("[Section]"). Returns OldSection if no match is found.
 parse_module(Line, OldSection) ->
-    case re:run(Line, "^\\[([a-zA-Z0-9\_-]*)\\]$", [{capture, global}]) of
+    case re:run(Line, "^\\[([a-zA-Z0-9\_-]*)\\]$", [{capture, first}]) of
         nomatch ->
             OldSection;
-        {match, [_, {Start, Length}]} ->
-            string:substr(Line, Start, Length)
+        {match, [{Start, Length}]} ->
+            string:substr(Line, Start+1, Length-1)
     end.
 
 %% @spec parse_variable(Line::string(), Option::string(), Value::string()) ->



Mime
View raw message