From f9bc3d66d6deb895f80788bf8df958f391e398d9 Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Sat, 4 Oct 2025 00:51:43 -0500 Subject: [PATCH] Update ota.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- ota.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ota.go b/ota.go index 62273732..cd80c9e1 100644 --- a/ota.go +++ b/ota.go @@ -261,7 +261,9 @@ func verifyFile(path string, expectedHash string, verifyProgress *float32, scope } // 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)) scopedLogger.Info().Str("path", path).Str("hash", hashSum).Msg("SHA256 hash of")