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
1 changed files with 2 additions and 2 deletions

View File

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