Use econf:directory to validate the path option
This commit is contained in:
parent
0da3afbeeb
commit
a41df9c914
|
@ -3,7 +3,7 @@
|
||||||
# log all vhosts chats in /var/log/ejabberd/chat directory in html
|
# log all vhosts chats in /var/log/ejabberd/chat directory in html
|
||||||
#modules:
|
#modules:
|
||||||
# mod_log_chat:
|
# mod_log_chat:
|
||||||
# path: "/var/log/ejabberd/chat"
|
# path: /var/log/ejabberd/chat
|
||||||
# format: html
|
# format: html
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@
|
||||||
# mod_log_chat:
|
# mod_log_chat:
|
||||||
# host_config:
|
# host_config:
|
||||||
# - "vh1.myjabberserver.net":
|
# - "vh1.myjabberserver.net":
|
||||||
# - path: "/var/log/ejabberd/vh1.myjabberserver.net"
|
# - path: /var/log/ejabberd/vh1.myjabberserver.net
|
||||||
# - format: html
|
# - format: html
|
||||||
# - "vh2.myjabberserver.net":
|
# - "vh2.myjabberserver.net":
|
||||||
# - path: "/var/log/ejabberd/vh2.myjabberserver.net"
|
# - path: /var/log/ejabberd/vh2.myjabberserver.net
|
||||||
# - format: text
|
# - format: text
|
||||||
|
|
|
@ -280,7 +280,7 @@ depends(_Host, _Opts) ->
|
||||||
[].
|
[].
|
||||||
|
|
||||||
mod_opt_type(host_config) -> econf:list(econf:any());
|
mod_opt_type(host_config) -> econf:list(econf:any());
|
||||||
mod_opt_type(path) -> fun iolist_to_binary/1;
|
mod_opt_type(path) -> econf:directory(write);
|
||||||
mod_opt_type(format) ->
|
mod_opt_type(format) ->
|
||||||
fun (A) when is_atom(A) -> A end.
|
fun (A) when is_atom(A) -> A end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue