Skip to content

Commit

Permalink
Validate the downloaded file
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
  • Loading branch information
Gregory Haskins committed Apr 21, 2011
1 parent 50e2ffd commit 7b9a71f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agent/app/src/main/erlang/release_fsm.erl
Expand Up @@ -208,7 +208,10 @@ connect(Session, State) ->
error_logger:info_msg("Downloading release file~n", []),
{ok, ODev} = file:open(ImageFile, [write, binary]),
{ok, _} = file:copy(IDev, ODev),
file:close(ODev);
file:close(ODev),

% validate the integrity of the download
ProvidedSha = compute_sha(ImageFile);
true ->
error_logger:info_msg("Using cached release file~n", []),
ok
Expand Down

0 comments on commit 7b9a71f

Please sign in to comment.