From f84c51b37a63c406ac3051b2e9538593a212e174 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sat, 14 Nov 2015 21:42:26 +0000 Subject: [PATCH] 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. --- src/rebar_erlc_compiler.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 57b738782..fb5796cef 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 ->