diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-07-17 18:38:59 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-07-18 18:58:15 +0200 |
commit | a4ffe1ce62aded579cef12cd707378360e64e902 (patch) | |
tree | 9a768a862f475f4d6c0f5ac5efe8673c4f7a49e7 | |
parent | 734d30f96e2390330234e10b0157d6d1e3741a7e (diff) |
Use filename:join/1
-rw-r--r-- | src/rebar.erl | 2 | ||||
-rw-r--r-- | src/rebar_app_utils.erl | 4 | ||||
-rw-r--r-- | src/rebar_templater.erl | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/rebar.erl b/src/rebar.erl index 797f71a..c0c6c97 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -99,7 +99,7 @@ run_aux(Commands) -> erlang:put(operations, 0), %% If $HOME/.rebar/config exists load and use as global config - GlobalConfigFile = filename:join(os:getenv("HOME"), ".rebar/config"), + GlobalConfigFile = filename:join([os:getenv("HOME"), ".rebar", "config"]), GlobalConfig = case filelib:is_regular(GlobalConfigFile) of true -> ?DEBUG("Load global config file ~p~n", diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index 7e6cbd9..b47520a 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -45,12 +45,12 @@ is_app_dir() -> is_app_dir(rebar_utils:get_cwd()). is_app_dir(Dir) -> - AppSrc = filename:join(Dir, "src/*.app.src"), + AppSrc = filename:join([Dir, "src", "*.app.src"]), case filelib:wildcard(AppSrc) of [AppSrcFile] -> {true, AppSrcFile}; _ -> - App = filename:join([Dir, "ebin/*.app"]), + App = filename:join([Dir, "ebin", "*.app"]), case filelib:wildcard(App) of [AppFile] -> {true, AppFile}; diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl index 0bda300..865c8d5 100644 --- a/src/rebar_templater.erl +++ b/src/rebar_templater.erl @@ -200,8 +200,8 @@ find_escript_templates() -> find_disk_templates() -> OtherTemplates = find_other_templates(), - HomeFiles = rebar_utils:find_files(filename:join(os:getenv("HOME"), - ".rebar/templates"), + HomeFiles = rebar_utils:find_files(filename:join([os:getenv("HOME"), + ".rebar", "templates"]), ?TEMPLATE_RE), LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE), [{file, F} || F <- OtherTemplates ++ HomeFiles ++ LocalFiles]. |