Use filename:join/1

This commit is contained in:
Tuncer Ayaz 2011-07-17 18:38:59 +02:00
parent 734d30f96e
commit a4ffe1ce62
3 changed files with 5 additions and 5 deletions

View file

@ -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",

View file

@ -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};

View file

@ -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].