aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-06-11 08:08:29 +0000
committerErlang/OTP <[email protected]>2010-06-11 08:08:29 +0000
commita346eb92eb7b5bedb36768c0a63b82547919bc0b (patch)
treeb607b2b1b66015fdca7163bd1dff61a5b4319fb3
parent627f79fc893a779f009b47cd8e9819eb7f34a7a0 (diff)
parent05e023894c704431c0eabf1db3506b839a5a79c0 (diff)
downloadotp-a346eb92eb7b5bedb36768c0a63b82547919bc0b.tar.gz
otp-a346eb92eb7b5bedb36768c0a63b82547919bc0b.tar.bz2
otp-a346eb92eb7b5bedb36768c0a63b82547919bc0b.zip
Merge branch 'hm/reltool-find-regular' into dev
* hm/reltool-find-regular: Improve lookup of erl files
-rw-r--r--lib/reltool/src/reltool_mod_win.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/reltool/src/reltool_mod_win.erl b/lib/reltool/src/reltool_mod_win.erl
index f68c61fd6f..281d2c8ad4 100644
--- a/lib/reltool/src/reltool_mod_win.erl
+++ b/lib/reltool/src/reltool_mod_win.erl
@@ -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} ->