aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-08-20 17:08:40 +0200
committerFredrik Gustafsson <[email protected]>2012-08-20 17:08:40 +0200
commitf09b615c6a63aa336787be78bb932fc350a1bbc0 (patch)
tree99d67140a213bae7ae749ba2722015056a070289 /lib/stdlib/src
parent786122a8cb40fbf9cb7357071c1bf13bf51e7f3c (diff)
parent6a22e6b29f8d86318fc72feb8698046546868481 (diff)
downloadotp-f09b615c6a63aa336787be78bb932fc350a1bbc0.tar.gz
otp-f09b615c6a63aa336787be78bb932fc350a1bbc0.tar.bz2
otp-f09b615c6a63aa336787be78bb932fc350a1bbc0.zip
Merge branch 'jkl/fix-filename-nativename/OTP-10188' into maint
* jkl/fix-filename-nativename/OTP-10188: Fix filename:nativename/1 on Win32 Add filename:nativename/1 binary argument test to suite
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/filename.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/stdlib/src/filename.erl b/lib/stdlib/src/filename.erl
index dbfcbea4f7..870af4e95f 100644
--- a/lib/stdlib/src/filename.erl
+++ b/lib/stdlib/src/filename.erl
@@ -726,6 +726,8 @@ nativename(Name0) ->
_ -> Name
end.
+win32_nativename(Name) when is_binary(Name) ->
+ binary:replace(Name, <<"/">>, <<"\\">>, [global]);
win32_nativename([$/|Rest]) ->
[$\\|win32_nativename(Rest)];
win32_nativename([C|Rest]) ->