diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-11-14 21:42:26 +0000 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-11-14 21:44:58 +0000 |
commit | f84c51b37a63c406ac3051b2e9538593a212e174 (patch) | |
tree | a0a581796a8869e60b24c466791ed17197bbebc8 /src | |
parent | cc11b7bcecfa80f5670cf5fb9e6aa41bb2f1eb54 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 57b7387..fb5796c 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -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 -> |