summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_config_writer.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_config_writer.erl b/src/couchdb/couch_config_writer.erl
index cb855ea8..08d4a5f5 100644
--- a/src/couchdb/couch_config_writer.erl
+++ b/src/couchdb/couch_config_writer.erl
@@ -136,11 +136,11 @@ append_var_to_section({{Section, Option}, Value}, Line, OldCurrentSection, DoneO
%% @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()) ->