aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2014-10-02 10:04:55 +0200
committerSiri Hansen <[email protected]>2014-10-02 10:04:55 +0200
commit02575ed55c4e89ed21223124314517ccce12b74d (patch)
tree0a5576e92b4ad29fbc502a0a9f0ebce729066e05 /lib/stdlib/src
parentb463a454323c0685146f23ce6423f459eb197bda (diff)
parent9708887c78138cfc2697e397eb4127d2ed1f61e7 (diff)
downloadotp-02575ed55c4e89ed21223124314517ccce12b74d.tar.gz
otp-02575ed55c4e89ed21223124314517ccce12b74d.tar.bz2
otp-02575ed55c4e89ed21223124314517ccce12b74d.zip
Merge branch 'siri/filename-join-2/OTP-12158'
* siri/filename-join-2/OTP-12158: Fix handling of single dot in filename:join/2
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/filename.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/stdlib/src/filename.erl b/lib/stdlib/src/filename.erl
index e6bde5673c..632af17e2a 100644
--- a/lib/stdlib/src/filename.erl
+++ b/lib/stdlib/src/filename.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -444,6 +444,8 @@ join1([], RelativeName, [$:|Rest], win32) ->
join1(RelativeName, [], [$:|Rest], win32);
join1([], RelativeName, [$/|Result], OsType) ->
join1(RelativeName, [], [$/|Result], OsType);
+join1([], RelativeName, [$., $/|Result], OsType) ->
+ join1(RelativeName, [], [$/|Result], OsType);
join1([], RelativeName, Result, OsType) ->
join1(RelativeName, [], [$/|Result], OsType);
join1([[_|_]=List|Rest], RelativeName, Result, OsType) ->
@@ -470,6 +472,8 @@ join1b(<<>>, RelativeName, [$:|Rest], win32) ->
join1b(RelativeName, <<>>, [$:|Rest], win32);
join1b(<<>>, RelativeName, [$/|Result], OsType) ->
join1b(RelativeName, <<>>, [$/|Result], OsType);
+join1b(<<>>, RelativeName, [$., $/|Result], OsType) ->
+ join1b(RelativeName, <<>>, [$/|Result], OsType);
join1b(<<>>, RelativeName, Result, OsType) ->
join1b(RelativeName, <<>>, [$/|Result], OsType);
join1b(<<Char,Rest/binary>>, RelativeName, Result, OsType) when is_integer(Char) ->