mirror of
https://github.com/correl/rebar.git
synced 2024-11-14 19:19:30 +00:00
erlc: replace if expression with case of
Motivated by the bug fix in 2c4d7d1
.
This commit is contained in:
parent
6fda9b8f88
commit
949d565527
1 changed files with 4 additions and 4 deletions
|
@ -409,17 +409,17 @@ init_erlcinfo(Config, Erls) ->
|
||||||
update_erlcinfo(G, Source, Dirs) ->
|
update_erlcinfo(G, Source, Dirs) ->
|
||||||
case digraph:vertex(G, Source) of
|
case digraph:vertex(G, Source) of
|
||||||
{_, LastUpdated} ->
|
{_, LastUpdated} ->
|
||||||
LastModified = filelib:last_modified(Source),
|
case filelib:last_modified(Source) of
|
||||||
if LastModified == 0 ->
|
0 ->
|
||||||
%% The file doesn't exist anymore,
|
%% The file doesn't exist anymore,
|
||||||
%% erase it from the graph.
|
%% erase it from the graph.
|
||||||
%% All the edges will be erased automatically.
|
%% All the edges will be erased automatically.
|
||||||
digraph:del_vertex(G, Source),
|
digraph:del_vertex(G, Source),
|
||||||
modified;
|
modified;
|
||||||
LastUpdated < LastModified ->
|
LastModified when LastUpdated < LastModified ->
|
||||||
modify_erlcinfo(G, Source, Dirs),
|
modify_erlcinfo(G, Source, Dirs),
|
||||||
modified;
|
modified;
|
||||||
true ->
|
_ ->
|
||||||
unmodified
|
unmodified
|
||||||
end;
|
end;
|
||||||
false ->
|
false ->
|
||||||
|
|
Loading…
Reference in a new issue