Skip to content

Commit

Permalink
Merge branch 'hm/reltool-find-regular' into dev
Browse files Browse the repository at this point in the history
* hm/reltool-find-regular:
  Improve lookup of erl files
  • Loading branch information
Erlang/OTP committed Jun 11, 2010
2 parents 627f79f + 05e0238 commit a346eb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/reltool/src/reltool_mod_win.erl
Expand Up @@ -334,9 +334,9 @@ find_regular_bin(App, Mod) ->
ActiveDir = App#app.active_dir,
SrcDir = filename:join([ActiveDir, "src"]),
ModStr = atom_to_list(Mod#mod.name),
Base = ModStr ++ ".erl",
Find = fun(F, _Acc) -> file:read_file(F) end,
case filelib:fold_files(SrcDir, Base, true, Find, {error, enoent}) of
Base = "^" ++ ModStr ++ "\\.erl$",
Find = fun(F, _Acc) -> throw(file:read_file(F)) end,
case catch filelib:fold_files(SrcDir, Base, true, Find, {error, enoent}) of
{ok, Bin} ->
Bin;
{error, enoent} ->
Expand Down

0 comments on commit a346eb9

Please sign in to comment.