aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorChristopher Faulet <[email protected]>2014-07-11 14:04:49 +0200
committerChristopher Faulet <[email protected]>2014-07-14 12:28:41 +0200
commita476a844554d25fd704888f63a302659aa5dc67a (patch)
tree8dba996b95a5fe43f637f16c41dc0a0e42972887 /lib/stdlib/test
parenta801af8e99b847bc4bd00bf8ba76a638ff90768f (diff)
downloadotp-a476a844554d25fd704888f63a302659aa5dc67a.tar.gz
otp-a476a844554d25fd704888f63a302659aa5dc67a.tar.bz2
otp-a476a844554d25fd704888f63a302659aa5dc67a.zip
Fix filelib:wildcard/2 when 'Cwd' ends with a dot
In such case, filelib:wildcard/2 returned truncated results: 1> file:set_cwd("/usr/lib/erlang/lib"). ok 2> filelib:wildcard("stdlib-*/ebin/*.app", filename:absname(".")). ["dlib-2.1/ebin/stdlib.app"]
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/filelib_SUITE.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl
index 8203a03a7a..1135828fae 100644
--- a/lib/stdlib/test/filelib_SUITE.erl
+++ b/lib/stdlib/test/filelib_SUITE.erl
@@ -86,6 +86,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;