diff options
author | Björn Gustavsson <[email protected]> | 2012-12-03 11:59:17 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-01-09 13:55:36 +0100 |
commit | 35a1863c7101821b841df78a62699584a6d50d81 (patch) | |
tree | d406cf17c44b510e5ef3a91c8ed13b692c1aa3bb /lib/kernel/src/code_server.erl | |
parent | beb660aa59a8d9cd7f65b8b91dc5dd9bc74015e0 (diff) | |
download | otp-35a1863c7101821b841df78a62699584a6d50d81.tar.gz otp-35a1863c7101821b841df78a62699584a6d50d81.tar.bz2 otp-35a1863c7101821b841df78a62699584a6d50d81.zip |
kernel: Eliminate use of packages in code and code_server
Diffstat (limited to 'lib/kernel/src/code_server.erl')
-rw-r--r-- | lib/kernel/src/code_server.erl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl index 00ad923466..b2d2c19f78 100644 --- a/lib/kernel/src/code_server.erl +++ b/lib/kernel/src/code_server.erl @@ -1229,7 +1229,7 @@ load_abs(File, Mod0, Caller, St) -> end. try_load_module(Mod, Dir, Caller, St) -> - File = filename:append(Dir, to_path(Mod) ++ + File = filename:append(Dir, to_list(Mod) ++ objfile_extension()), case erl_prim_loader:get_file(File) of error -> @@ -1347,7 +1347,7 @@ load_file_1(Mod, Caller, #state{cache=Cache}=St0) -> end. mod_to_bin([Dir|Tail], Mod) -> - File = filename:append(Dir, to_path(Mod) ++ objfile_extension()), + File = filename:append(Dir, to_list(Mod) ++ objfile_extension()), case erl_prim_loader:get_file(File) of error -> mod_to_bin(Tail, Mod); @@ -1356,7 +1356,7 @@ mod_to_bin([Dir|Tail], Mod) -> end; mod_to_bin([], Mod) -> %% At last, try also erl_prim_loader's own method - File = to_path(Mod) ++ objfile_extension(), + File = to_list(Mod) ++ objfile_extension(), case erl_prim_loader:get_file(File) of error -> error; % No more alternatives ! @@ -1570,6 +1570,3 @@ to_list(X) when is_atom(X) -> atom_to_list(X). to_atom(X) when is_atom(X) -> X; to_atom(X) when is_list(X) -> list_to_atom(X). - -to_path(X) -> - filename:join(packages:split(X)). |