mirror of https://github.com/jetkvm/kvm.git
Update ota.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
dd387e21bd
commit
f9bc3d66d6
4
ota.go
4
ota.go
|
|
@ -261,7 +261,9 @@ func verifyFile(path string, expectedHash string, verifyProgress *float32, scope
|
||||||
}
|
}
|
||||||
|
|
||||||
// close the file so we can rename below
|
// close the file so we can rename below
|
||||||
fileToHash.Close()
|
if err := fileToHash.Close(); err != nil {
|
||||||
|
return fmt.Errorf("error closing file: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
hashSum := hex.EncodeToString(hash.Sum(nil))
|
hashSum := hex.EncodeToString(hash.Sum(nil))
|
||||||
scopedLogger.Info().Str("path", path).Str("hash", hashSum).Msg("SHA256 hash of")
|
scopedLogger.Info().Str("path", path).Str("hash", hashSum).Msg("SHA256 hash of")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue