Ver a proveniência

Use filename:join/1

pull/3/head
Tuncer Ayaz há 14 anos
ascendente
cometimento
a4ffe1ce62
3 ficheiros alterados com 5 adições e 5 eliminações
  1. +1
    -1
      src/rebar.erl
  2. +2
    -2
      src/rebar_app_utils.erl
  3. +2
    -2
      src/rebar_templater.erl

+ 1
- 1
src/rebar.erl Ver ficheiro

@ -99,7 +99,7 @@ run_aux(Commands) ->
erlang:put(operations, 0), erlang:put(operations, 0),
%% If $HOME/.rebar/config exists load and use as global config %% 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</span>", "config"]),
GlobalConfig = case filelib:is_regular(GlobalConfigFile) of GlobalConfig = case filelib:is_regular(GlobalConfigFile) of
true -> true ->
?DEBUG("Load global config file ~p~n", ?DEBUG("Load global config file ~p~n",

+ 2
- 2
src/rebar_app_utils.erl Ver ficheiro

@ -45,12 +45,12 @@ is_app_dir() ->
is_app_dir(rebar_utils:get_cwd()). is_app_dir(rebar_utils:get_cwd()).
is_app_dir(Dir) -> is_app_dir(Dir) ->
AppSrc = filename:join(Dir, "src/*.app.src"),
AppSrc = filename:join([Dir, "src</span>", "*.app.src"]),
case filelib:wildcard(AppSrc) of case filelib:wildcard(AppSrc) of
[AppSrcFile] -> [AppSrcFile] ->
{true, AppSrcFile}; {true, AppSrcFile};
_ -> _ ->
App = filename:join([Dir, "ebin/*.app"]),
App = filename:join([Dir, "ebin</span>", "*.app"]),
case filelib:wildcard(App) of case filelib:wildcard(App) of
[AppFile] -> [AppFile] ->
{true, AppFile}; {true, AppFile};

+ 2
- 2
src/rebar_templater.erl Ver ficheiro

@ -200,8 +200,8 @@ find_escript_templates() ->
find_disk_templates() -> find_disk_templates() ->
OtherTemplates = find_other_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</span>", "templates"]),
?TEMPLATE_RE), ?TEMPLATE_RE),
LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE), LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE),
[{file, F} || F <- OtherTemplates ++ HomeFiles ++ LocalFiles]. [{file, F} || F <- OtherTemplates ++ HomeFiles ++ LocalFiles].

Carregando…
Cancelar
Guardar