diff options
author | Jan Klötzke <jan.kloetzke@freenet.de> | 2012-06-23 20:40:22 +0200 |
---|---|---|
committer | U-AXEL\Jan <Jan@Axel.(none)> | 2012-07-30 22:01:05 +0200 |
commit | 6a22e6b29f8d86318fc72feb8698046546868481 (patch) | |
tree | 69977433a949e8b0754ac9d8489d818fa512e56f /lib/stdlib/src | |
parent | f2b8bdca45a275fe95089c57049172157fecd53c (diff) | |
download | otp-6a22e6b29f8d86318fc72feb8698046546868481.tar.gz otp-6a22e6b29f8d86318fc72feb8698046546868481.tar.bz2 otp-6a22e6b29f8d86318fc72feb8698046546868481.zip |
Fix filename:nativename/1 on Win32
Don't choke on paths given as binary argument on Win32.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/filename.erl | 2 |
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]) -> |