summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_config_writer.erl
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-06-27 14:32:36 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-06-27 14:32:36 +0000
commit57326fb4942281109d21fef403f51867c8f984f7 (patch)
treee949498fa1f96b8394753bdb38c5dcefbffd7735 /src/couchdb/couch_config_writer.erl
parent11e6db89380142ada9638d02614beea2952d9b86 (diff)
removed some dead code found by Dialyzer, more to come
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@788979 13f79535-47bb-0310-9956-ffa450edef68
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