evanmiller/ChicagoBoss — comment on commit 2abba2b1db3dd068ba61206a5514caba902a4396
File:  line 0
By jgordor:

Hi Evan,

After update my repo, the relative paths patches make custom tag lib compilation fails, this patch solves the problem (but I'm not sure if this breaks non-cb erlydtl apps):

diff --git a/src/erlydtl/erlydtl_compiler.erl b/src/erlydtl/erlydtl_compiler.erl
index dda5bbf..bcedd29 100755
--- a/src/erlydtl/erlydtl_compiler.erl
+++ b/src/erlydtl/erlydtl_compiler.erl
@@ -116,7 +116,8 @@ compile_dir(Dir, Module) ->

compile_dir(Dir, Module, Options) ->
Context = init_dtl_context_dir(Dir, Module, Options),
- Files = filelib:fold_files(Dir, ".*", true, fun(F1,Acc1) -> [F1 | Acc1] end, []),
+ FilesAbs = filelib:fold_files(Dir, ".*", true, fun(F1,Acc1) -> [F1 | Acc1] end, []),
+ Files = lists:map(fun(X) -> string:substr(X, length(Dir) + 2, length(X)) end, FilesAbs),
{ParserResults, ParserErrors} = lists:foldl(fun
("."++_, Acc) -> Acc;
(File, {ResultAcc, ErrorAcc}) ->