25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Fix function clause on filelib:wildcard/1

This commit is contained in:
Evgeniy Khramtsov 2017-11-24 12:10:03 +03:00
parent a57c694f21
commit e31f6409a6

View File

@ -278,7 +278,7 @@ get_certfiles_from_config_options(State) ->
undefined ->
[];
Paths ->
lists:flatmap(fun filelib:wildcard/1, Paths)
lists:flatmap(fun wildcard/1, Paths)
end,
Local = lists:flatmap(
fun(OptHost) ->
@ -532,7 +532,7 @@ certs_dir() ->
-spec clean_dir(file:filename_all()) -> ok.
clean_dir(Dir) ->
?DEBUG("Cleaning directory ~s", [Dir]),
Files = filelib:wildcard(filename:join(Dir, "*")),
Files = wildcard(filename:join(Dir, "*")),
lists:foreach(
fun(Path) ->
case filelib:is_file(Path) of
@ -545,7 +545,7 @@ clean_dir(Dir) ->
-spec check_ca_dir() -> ok.
check_ca_dir() ->
case filelib:wildcard(filename:join(ca_dir(), "*.0")) of
case wildcard(filename:join(ca_dir(), "*.0")) of
[] ->
Hint = "configuring 'ca_path' option might help",
case file:list_dir(ca_dir()) of
@ -728,3 +728,8 @@ start_fs() ->
[Reason]),
false
end.
wildcard(Path) when is_binary(Path) ->
wildcard(binary_to_list(Path));
wildcard(Path) ->
filelib:wildcard(Path).