Permalink
Browse files

handle empty source files

  • Loading branch information...
1 parent 49d7cbc commit b6d7bbb29e67dd91fbdbf4791aaf758c484853bc @fjl committed Aug 11, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/tetrapak_task_erlc.erl
View
2 src/tetrapak_task_erlc.erl
@@ -178,6 +178,8 @@ erlang_source_files(Path) ->
scan_source(Path) ->
case epp_dodger:quick_parse_file(Path, []) of
+ {ok, []} ->
+ #erl{mtime = tpk_file:mtime(Path), file = Path, module = filename:basename(Path, ".erl")};
{ok, Forms} ->
Rec = #erl{mtime = tpk_file:mtime(Path), file = Path, module = filename:basename(Path, ".erl")},
lists:foldl(fun (F, Acc) -> do_form(Path, F, Acc) end, Rec, tl(Forms))

0 comments on commit b6d7bbb

Please sign in to comment.