Browse Source

Fix error reports on missing include paths

In some cases (nested includes?) paths end up in such a way that joining
them breaks up and hard-crashes rebar3. This patch specifically handles
this scenario to fix things by avoiding passing empty lists to
filename:join.
pull/921/head
Fred Hebert 9 years ago
parent
commit
f84c51b37a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/rebar_erlc_compiler.erl

+ 1
- 1
src/rebar_erlc_compiler.erl View File

@ -688,7 +688,7 @@ warn_and_find_path(File, Dir) ->
true ->
[SrcHeader];
false ->
IncludeDir = filename:join(filename:join(rebar_utils:droplast(filename:split(Dir))), "include"),
IncludeDir = filename:join(rebar_utils:droplast(filename:split(Dir))++["include"]),
IncludeHeader = filename:join(IncludeDir, File),
case filelib:is_regular(IncludeHeader) of
true ->

Loading…
Cancel
Save