summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_config_writer.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb/couch_config_writer.erl')
-rw-r--r--src/couchdb/couch_config_writer.erl13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/couchdb/couch_config_writer.erl b/src/couchdb/couch_config_writer.erl
index fd4a0215..e47b9052 100644
--- a/src/couchdb/couch_config_writer.erl
+++ b/src/couchdb/couch_config_writer.erl
@@ -54,11 +54,8 @@ save_to_file({{Section, Option}, Value}, File) ->
_ ->
NewFileContents2
end,
-
- % do the save, close the config file and get out
- save_file(File, NewFileContents),
- file:close(Stream),
-
+
+ ok = file:write_file(File, list_to_binary(NewFileContents)),
ok.
%% @doc Iterates over the lines of an ini file and replaces or adds a new
@@ -164,9 +161,3 @@ parse_variable(Line, Option, Value) ->
{match, _Start, _Length} ->
Option ++ " = " ++ Value
end.
-
-%% @spec save_file(File::filename(), Contents::string()) ->
-%% ok | {error, Reason::string()}
-%% @doc Writes Contents to File
-save_file(File, Contents) ->
- file:write_file(File, list_to_binary(Contents)). \ No newline at end of file