aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--repo.go7
1 files changed, 6 insertions, 1 deletions
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()
}