Skip to content

Commit

Permalink
Fix code:lib_dir call to work with Erlang/OTP 27.0-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed Mar 31, 2024
1 parent a5a2a14 commit 4a8e7db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ejabberd.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down

0 comments on commit 4a8e7db

Please sign in to comment.