From 63f156021298f710cb2c4fc460f046c366329a43 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Tue, 14 Sep 2021 17:25:05 +0200 Subject: close some unclosed files try to consistently fix windows tests --- repo.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'repo.go') diff --git a/repo.go b/repo.go index a3aee80..bde894d 100644 --- a/repo.go +++ b/repo.go @@ -214,7 +214,12 @@ func concatFiles(files []File, stream io.WriteCloser) { logger.Errorf("reading file '%s': %s", f.Path, err) continue } - io.Copy(stream, file) + if n, err := io.Copy(stream, file); err != nil { + logger.Panic(n, err) + } + if err = file.Close(); err != nil { + logger.Panic(err) + } } stream.Close() } -- cgit v1.2.3