瀏覽代碼

erlc: replace if expression with case of

Motivated by the bug fix in 2c4d7d1.
pull/3/head
Tuncer Ayaz 11 年之前
父節點
當前提交
949d565527
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. +4
    -4
      src/rebar_erlc_compiler.erl

+ 4
- 4
src/rebar_erlc_compiler.erl 查看文件

@ -409,17 +409,17 @@ init_erlcinfo(Config, Erls) ->
update_erlcinfo(G, Source, Dirs) ->
case digraph:vertex(G, Source) of
{_, LastUpdated} ->
LastModified = filelib:last_modified(Source),
class="k">if class="nv">LastModified == 0 ->
case filelib:last_modified(Source) of
0 ->
%% The file doesn't exist anymore,
%% erase it from the graph.
%% All the edges will be erased automatically.
digraph:del_vertex(G, Source),
modified;
LastUpdated < LastModified ->
LastModified when LastUpdated < LastModified ->
modify_erlcinfo(G, Source, Dirs),
modified;
true ->
_ ->
unmodified
end;
false ->

Loading…
取消
儲存