Skip to content

Commit

Permalink
handle empty source files
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Aug 11, 2011
1 parent 49d7cbc commit b6d7bbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tetrapak_task_erlc.erl
Expand Up @@ -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))
Expand Down

0 comments on commit b6d7bbb

Please sign in to comment.