Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only compile files without trailing tilde (~).

  • Loading branch information...
commit 7595a2dc18bd32c2ab356cf84a0d730e330c16cf 1 parent 22c58ff
@runejuhl authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/erlydtl_compiler.erl
View
4 src/erlydtl_compiler.erl
@@ -117,7 +117,9 @@ compile_dir(Dir, Module) ->
compile_dir(Dir, Module, Options) ->
Context = init_dtl_context_dir(Dir, Module, Options),
- Files = filelib:fold_files(Dir, ".+\.html", true, fun(F1,Acc1) -> [F1 | Acc1] end, []),
+ %% Find all files in Dir (recursively), matching the regex (no
+ %% files ending in "~").
+ Files = filelib:fold_files(Dir, ".+[^~]$", true, fun(F1,Acc1) -> [F1 | Acc1] end, []),
{ParserResults, ParserErrors} = lists:foldl(fun
(File, {ResultAcc, ErrorAcc}) ->
case filename:basename(File) of
Please sign in to comment.
Something went wrong with that request. Please try again.