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:
parent
8a99287374
commit
e575f401cd
@ -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
|
||||
|
@ -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, []};
|
||||
|
Loading…
Reference in New Issue
Block a user