From 34a713d88a421dcd2d85521497afd47854908533 Mon Sep 17 00:00:00 2001 From: Vitalii Kulchevych Date: Tue, 2 Dec 2014 16:51:36 +0200 Subject: [PATCH] fix target dir without subdir for erlydtl templates --- src/rebar_base_compiler.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rebar_base_compiler.erl b/src/rebar_base_compiler.erl index b400512..0983e17 100644 --- a/src/rebar_base_compiler.erl +++ b/src/rebar_base_compiler.erl @@ -107,8 +107,7 @@ 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) ->