25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Fix code:lib_dir call to work with Erlang/OTP 27.0-rc2

This commit is contained in:
Badlop 2024-03-29 20:49:08 +01:00
parent a1b76ac0a9
commit 50c74ab821

View File

@ -160,11 +160,11 @@ exit_or_halt(Reason, StartFlag) ->
get_module_file(App, Mod) ->
BaseName = atom_to_list(Mod),
case code:lib_dir(App, ebin) of
case code:lib_dir(App) of
{error, _} ->
BaseName;
Dir ->
filename:join([Dir, BaseName ++ ".beam"])
filename:join([Dir, "ebin", BaseName ++ ".beam"])
end.
module_name([Dir, _, <<H,_/binary>> | _] = Mod) when H >= 65, H =< 90 ->