diff options
author | Jan Lehnardt <jan@apache.org> | 2008-08-30 20:50:03 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2008-08-30 20:50:03 +0000 |
commit | 85221b542f438dc85faad7a6afcddd67d5984e6e (patch) | |
tree | 1134b07cba4b3c33627b83299649f2d330770894 /src/couchdb | |
parent | b1d05573d71483f22d6c32125c04407eaefdffcf (diff) |
- Remove dependency on test/local.ini
- Write out new variables in key = value format
- Fix tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@690584 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_config_writer.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_config_writer.erl b/src/couchdb/couch_config_writer.erl index 561fd6c2..e9438e2c 100644 --- a/src/couchdb/couch_config_writer.erl +++ b/src/couchdb/couch_config_writer.erl @@ -108,7 +108,7 @@ save_loop(_Config, [], _OldModule, NewFileContents, _DoneVariable) -> NewFileContents. append_new_ini_section({{ModuleName, Variable}, Value}, OldFileContents) -> - OldFileContents ++ "\n\n" ++ ModuleName ++ "\n" ++ Variable ++ "=" ++ Value ++ "\n". + OldFileContents ++ "\n\n" ++ ModuleName ++ "\n" ++ Variable ++ " = " ++ Value ++ "\n". %% @spec parse_module(Lins::string(), OldModule::string()) -> string() %% @doc Tries to match a line against a pattern specifying a ini module or @@ -130,14 +130,14 @@ parse_module(Line, OldModule) -> %% Variable is not found. Returns a new line composed of the Variable and %% Value otherwise. parse_variable(Line, Variable, Value) -> - case regexp:match(Line, "^" ++ Variable ++ "=") of + case regexp:match(Line, "^" ++ Variable ++ "\s?=") of nomatch -> nomatch; {error, Error}-> io:format("ini file regex error variable: '~s'~n", [Error]), nomatch; {match, _Start, _Length} -> - Variable ++ "=" ++ Value + Variable ++ " = " ++ Value end. %% @spec save_file(File::filename(), Contents::string()) -> |