aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/code.erl
diff options
context:
space:
mode:
authorTuncer Ayaz <[email protected]>2010-04-16 19:03:36 +0200
committerTuncer Ayaz <[email protected]>2010-04-19 12:46:57 +0200
commit7cca1066500448c2f061f0b1c9a2b04d185b1168 (patch)
treed74c31fe15edff0445dc9b0a35e4deaedd3d4677 /lib/kernel/src/code.erl
parenta19fd2834746bdbca52763ff9b044db7bd0a83aa (diff)
downloadotp-7cca1066500448c2f061f0b1c9a2b04d185b1168.tar.gz
otp-7cca1066500448c2f061f0b1c9a2b04d185b1168.tar.bz2
otp-7cca1066500448c2f061f0b1c9a2b04d185b1168.zip
code:clash/0: match correct return value from erl_prim_loader:list_dir/1
erl_prim_loader:list_dir/1 returns error on failure and not {error,_}. Also update tests in code_SUITE:clash/1. Defect was introduced with fix for listing .ez archives in 49da83de4b. Initial code:clash/0 tests added in 79194d5fa7. Signed-off-by: Tuncer Ayaz <[email protected]>
Diffstat (limited to 'lib/kernel/src/code.erl')
-rw-r--r--lib/kernel/src/code.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl
index ffe58ae7a9..db05c1d234 100644
--- a/lib/kernel/src/code.erl
+++ b/lib/kernel/src/code.erl
@@ -473,7 +473,7 @@ decorate([], _) -> [];
decorate([File|Tail], Dir) ->
[{Dir, File} | decorate(Tail, Dir)].
-filter(_Ext, Dir, {error,_}) ->
+filter(_Ext, Dir, error) ->
io:format("** Bad path can't read ~s~n", [Dir]), [];
filter(Ext, _, {ok,Files}) ->
filter2(Ext, length(Ext), Files).