Просмотр исходного кода

Use filename:join/1

pull/3/head
Tuncer Ayaz 13 лет назад
Родитель
Сommit
a4ffe1ce62
3 измененных файлов: 5 добавлений и 5 удалений
  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 Просмотреть файл

@ -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</span>", "config"]),
GlobalConfig = case filelib:is_regular(GlobalConfigFile) of
true ->
?DEBUG("Load global config file ~p~n",

+ 2
- 2
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</span>", "*.app.src"]),
case filelib:wildcard(AppSrc) of
[AppSrcFile] ->
{true, AppSrcFile};
_ ->
App = filename:join([Dir, "ebin/*.app"]),
App = filename:join([Dir, "ebin</span>", "*.app"]),
case filelib:wildcard(App) of
[AppFile] ->
{true, AppFile};

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

Загрузка…
Отмена
Сохранить