summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_config_writer.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/couchdb/couch_config_writer.erl b/src/couchdb/couch_config_writer.erl
index 4a859f8d..55e76a84 100644
--- a/src/couchdb/couch_config_writer.erl
+++ b/src/couchdb/couch_config_writer.erl
@@ -55,7 +55,10 @@ save_to_file({{Section, Option}, Value}, File) ->
NewFileContents2
end,
- ok = file:write_file(File, list_to_binary(NewFileContents)),
+ case file:write_file(File, list_to_binary(NewFileContents)) of
+ ok -> ok;
+ _Else -> throw({permissions_error, <<"Config file is not writeable.">>})
+ end,
ok.
%% @doc Iterates over the lines of an ini file and replaces or adds a new