25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Accept configuration file with .yaml extension (#290)

This commit is contained in:
Badlop 2015-03-04 17:18:57 +01:00
parent 8a99287374
commit e575f401cd
2 changed files with 2 additions and 2 deletions

View File

@ -152,7 +152,7 @@
#' EJABBERD_CONFIG_PATH: ejabberd configuration file
#
# Specify the full path to the ejabberd configuration file. If the file name has
# a ".yml" extension, it is parsed as a YAML file; otherwise, Erlang syntax is
# yml or yaml extension, it is parsed as a YAML file; otherwise, Erlang syntax is
# expected.
#
# Default: $ETC_DIR/ejabberd.yml

View File

@ -185,7 +185,7 @@ get_plain_terms_file(File1, Opts) ->
consult(File) ->
case filename:extension(File) of
".yml" ->
Ex when (Ex == ".yml") or (Ex == ".yaml") ->
case p1_yaml:decode_from_file(File, [plain_as_atom]) of
{ok, []} ->
{ok, []};