aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-11-15 10:52:14 +0100
committerSiri Hansen <[email protected]>2013-11-15 10:52:14 +0100
commit9315ebe52626e7320e1de14d704ec5e3c7d72d1c (patch)
treeb56df735adb24b91e19d4f1fe4118f1c83f06751 /erts/preloaded
parent19aedb5c0cb956e51b24fbba4923520efe7bf54b (diff)
downloadotp-9315ebe52626e7320e1de14d704ec5e3c7d72d1c.tar.gz
otp-9315ebe52626e7320e1de14d704ec5e3c7d72d1c.tar.bz2
otp-9315ebe52626e7320e1de14d704ec5e3c7d72d1c.zip
Fix bug with backslash in erl_prim_loader:normalize/1
This function normalizes a path: * convert atoms to strings * flatten strings * convert backslash to a forward slash The bugfix is to only convert backslashes to forward slashes on windows and not on any other platforms.
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/src/erl_prim_loader.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl
index e8ddfc4a57..fc43d1d4fa 100644
--- a/erts/preloaded/src/erl_prim_loader.erl
+++ b/erts/preloaded/src/erl_prim_loader.erl
@@ -1439,7 +1439,12 @@ normalize(Name, Acc) ->
[Atom | Rest] when is_atom(Atom) ->
normalize(atom_to_list(Atom) ++ Rest, Acc);
[$\\ | Chars] ->
- normalize(Chars, [$/ | Acc]);
+ case erlang:system_info(os_type) of
+ {win32, _} ->
+ normalize(Chars, [$/ | Acc]);
+ _ ->
+ normalize(Chars, [$\\ | Acc])
+ end;
[Char | Chars] ->
normalize(Chars, [Char | Acc]);
[] ->