shared/net: Fix hash matching
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
This commit is contained in:
parent
663e5bff80
commit
9f09f83c14
@ -43,6 +43,8 @@ func DownloadHash(file, checksum string, hashFunc hash.Hash) error {
|
||||
defer image.Close()
|
||||
|
||||
if checksum != "" {
|
||||
hashFunc.Reset()
|
||||
|
||||
_, err = io.Copy(hashFunc, image)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user