aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2014-10-01 10:33:07 +0200
committerMarcus Arendt <[email protected]>2014-10-01 10:33:07 +0200
commit0b99d067173cf0de96a1727af330638ec2e5e0d0 (patch)
tree9c9ddbb2a69425cd3b1b8c3edd4477791b2dd147
parentc3124a7b4ce03e181f2c57ac727dfd854fd32d80 (diff)
parent86ae7ccc44b38137c504a46b619ffad935d74b99 (diff)
downloadotp-0b99d067173cf0de96a1727af330638ec2e5e0d0.tar.gz
otp-0b99d067173cf0de96a1727af330638ec2e5e0d0.tar.bz2
otp-0b99d067173cf0de96a1727af330638ec2e5e0d0.zip
Merge branch 'maint'
-rw-r--r--lib/stdlib/src/filelib.erl2
-rw-r--r--lib/stdlib/test/filelib_SUITE.erl1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/stdlib/src/filelib.erl b/lib/stdlib/src/filelib.erl
index 9efbe8da20..daae1fd2d2 100644
--- a/lib/stdlib/src/filelib.erl
+++ b/lib/stdlib/src/filelib.erl
@@ -371,7 +371,7 @@ compile_wildcard(Pattern, Cwd0) ->
[Root|Rest] = filename:split(Pattern),
case filename:pathtype(Root) of
relative ->
- Cwd = filename:join([Cwd0]),
+ Cwd = prepare_base(Cwd0),
compile_wildcard_2([Root|Rest], {cwd,Cwd});
_ ->
compile_wildcard_2(Rest, {root,0,Root})
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl
index 040ae1effc..bd313390b3 100644
--- a/lib/stdlib/test/filelib_SUITE.erl
+++ b/lib/stdlib/test/filelib_SUITE.erl
@@ -88,6 +88,7 @@ wildcard_two(Config) when is_list(Config) ->
?line ok = file:make_dir(Dir),
?line do_wildcard_1(Dir, fun(Wc) -> io:format("~p~n",[{Wc,Dir, X = filelib:wildcard(Wc, Dir)}]),X end),
?line do_wildcard_1(Dir, fun(Wc) -> filelib:wildcard(Wc, Dir++"/") end),
+ ?line do_wildcard_1(Dir, fun(Wc) -> filelib:wildcard(Wc, Dir++"/.") end),
case os:type() of
{win32,_} ->
ok;