diff options
Diffstat (limited to 'apps/couch/src/couch_config_writer.erl')
-rw-r--r-- | apps/couch/src/couch_config_writer.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/couch/src/couch_config_writer.erl b/apps/couch/src/couch_config_writer.erl index c8691d79..decd269a 100644 --- a/apps/couch/src/couch_config_writer.erl +++ b/apps/couch/src/couch_config_writer.erl @@ -35,7 +35,14 @@ save_to_file({{Section, Key}, Value}, File) -> NewLines = process_file_lines(Lines, [], SectionLine, Pattern, Key, Value), NewFileContents = reverse_and_add_newline(strip_empty_lines(NewLines), []), - ok = file:write_file(File, NewFileContents). + case file:write_file(File, NewFileContents) of + ok -> + ok; + {error, eacces} -> + {file_permission_error, File}; + Error -> + Error + end. process_file_lines([Section|Rest], SeenLines, Section, Pattern, Key, Value) -> |