From e575f401cdf91b084a52b882d9a1710965c756d4 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 4 Mar 2015 17:18:57 +0100 Subject: [PATCH] Accept configuration file with .yaml extension (#290) --- ejabberdctl.cfg.example | 2 +- src/ejabberd_config.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ejabberdctl.cfg.example b/ejabberdctl.cfg.example index b582527eb..7bccb4183 100644 --- a/ejabberdctl.cfg.example +++ b/ejabberdctl.cfg.example @@ -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 diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl index 54a635905..6fc6c9e34 100644 --- a/src/ejabberd_config.erl +++ b/src/ejabberd_config.erl @@ -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, []};