fix target dir without subdir for erlydtl templates

This commit is contained in:
Vitalii Kulchevych 2014-12-02 16:51:36 +02:00
parent 47dba1bbc3
commit 34a713d88a

View file

@ -107,8 +107,7 @@ target_file(SourceFile, SourceDir, SourceExt, TargetDir, TargetExt) ->
%% Remove all leading components of the source dir from the file -- we want %% 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 %% to maintain the deeper structure (if any) of the source file path
BaseFile = remove_common_path(SourceFile, SourceDir), BaseFile = remove_common_path(SourceFile, SourceDir),
filename:join([TargetDir, filename:dirname(BaseFile), filename:join([TargetDir, filename:basename(BaseFile, SourceExt) ++ TargetExt]).
filename:basename(BaseFile, SourceExt) ++ TargetExt]).
remove_common_path(Fname, Path) -> remove_common_path(Fname, Path) ->