From bc1f3ce3b707f25397a1ff484d34ee406e0db73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 5 Sep 2011 09:21:11 +0200 Subject: filename: Eliminate failing call to Mod:module_info(source_file) Mod:module_info(source_file) is no longer supported (and have not been for a long time), so calling it will always fail. --- lib/stdlib/src/filename.erl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/stdlib/src/filename.erl') diff --git a/lib/stdlib/src/filename.erl b/lib/stdlib/src/filename.erl index acd7985c16..7144781843 100644 --- a/lib/stdlib/src/filename.erl +++ b/lib/stdlib/src/filename.erl @@ -873,12 +873,7 @@ filter_options(_Base, [], Result) -> %% Gets the source file given path of object code and module name. get_source_file(Obj, Mod, Rules) -> - case catch Mod:module_info(source_file) of - {'EXIT', _Reason} -> - source_by_rules(dirname(Obj), packages:last(Mod), Rules); - File -> - {ok, File} - end. + source_by_rules(dirname(Obj), packages:last(Mod), Rules). source_by_rules(Dir, Base, [{From, To}|Rest]) -> case try_rule(Dir, Base, From, To) of -- cgit v1.2.3