summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-01-13 19:00:44 +0100
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-01-13 19:00:44 +0100
commiteab5ae529889ffb6fbc1a3c8266915f8b902287a (patch)
tree61b9fd4dd40c567903fceca7d8d4bd353b0346c2 /src
parent0689928527dd703e2b589613b52634e8ab15996f (diff)
Fix code clarity in dir type check
Diffstat (limited to 'src')
-rw-r--r--src/rebar_core.erl14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 56b32f2..1313c7f 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -124,18 +124,14 @@ maybe_process_dir({[], undefined}=ModuleSet, Config, CurrentCodePath,
process_dir0(Dir, Command, DirSet, Config, CurrentCodePath, ModuleSet);
maybe_process_dir({_, ModuleSetFile}=ModuleSet, Config, CurrentCodePath,
Dir, Command, DirSet) ->
- case lists:reverse(ModuleSetFile) of
- "ppa." ++ _ ->
- %% .app file
- maybe_process_dir0(ModuleSetFile, ModuleSet,
- Config, CurrentCodePath, Dir,
- Command, DirSet);
- "crs.ppa." ++ _ ->
- %% .app.src file
+ case lists:suffix(".app", ModuleSetFile)
+ orelse lists:suffix(".app.src", ModuleSetFile) of
+ true ->
+ %% .app or .app.src file, check if is_skipped_app
maybe_process_dir0(ModuleSetFile, ModuleSet,
Config, CurrentCodePath, Dir,
Command, DirSet);
- _ ->
+ false ->
%% not an app dir, no need to consider apps=/skip_apps=
process_dir0(Dir, Command, DirSet, Config,
CurrentCodePath, ModuleSet)