From 111fc9769b629d8fa1bb0acf7da19404fc84e606 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 5 Dec 2014 09:58:05 -0600 Subject: merge over rebar2 PR #401 --- src/rebar_base_compiler.erl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/rebar_base_compiler.erl') diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl index ee023e7..293b4d8 100644 --- a/src/rebar_base_compiler.erl +++ b/src/rebar_base_compiler.erl @@ -104,12 +104,8 @@ simple_compile_wrapper(Source, Target, Compile3Fn, Config, true) -> end. target_file(SourceFile, SourceDir, SourceExt, TargetDir, TargetExt) -> - %% Remove all leading components of the source dir from the file -- we want - %% to maintain the deeper structure (if any) of the source file path BaseFile = remove_common_path(SourceFile, SourceDir), - filename:join([TargetDir, filename:dirname(BaseFile), - filename:basename(BaseFile, SourceExt) ++ TargetExt]). - + filename:join([TargetDir, filename:basename(BaseFile, SourceExt) ++ TargetExt]). remove_common_path(Fname, Path) -> remove_common_path1(filename:split(Fname), filename:split(Path)). -- cgit v1.1