aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/code_server.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-03-14 12:49:53 +0100
committerBjörn Gustavsson <[email protected]>2016-03-16 10:11:12 +0100
commit577125cc69feb5c14fa7e13edd3c3157f9c4a0ec (patch)
treeb5d355bb122708b5d787584b1d9373bb775aeeeb /lib/kernel/src/code_server.erl
parent4e0c08b7b7658531af6151702372e2b9bdd8d8fd (diff)
downloadotp-577125cc69feb5c14fa7e13edd3c3157f9c4a0ec.tar.gz
otp-577125cc69feb5c14fa7e13edd3c3157f9c4a0ec.tar.bz2
otp-577125cc69feb5c14fa7e13edd3c3157f9c4a0ec.zip
code_server: Normalize the pathnames for all loaded modules
On Windows, the pathnames for modules that are loaded early are returned with mixed backslashes and slashes: 1> code:which(lists). "C:\\Program Files\\erl8.0/lib/stdlib-2.7/ebin/lists.beam" 2> Modules loaded later are fully normalized. When starting the code_server, normalize the pathnames for all modules that have been loaded so far.
Diffstat (limited to 'lib/kernel/src/code_server.erl')
-rw-r--r--lib/kernel/src/code_server.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 6262407354..fb08b4c22b 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -67,7 +67,9 @@ init(Ref, Parent, [Root,Mode]) ->
%% Pre-loaded modules are always sticky.
ets:insert(Db, [{M,preloaded},{{sticky,M},true}])
end, erlang:pre_loaded()),
- ets:insert(Db, init:fetch_loaded()),
+ Loaded0 = init:fetch_loaded(),
+ Loaded = [{M,filename:join([P])} || {M,P} <- Loaded0], %Normalize.
+ ets:insert(Db, Loaded),
IPath =
case Mode of