aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-14 17:25:05 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-14 17:25:05 +0200
commit63f156021298f710cb2c4fc460f046c366329a43 (patch)
treec2cfa7c0573c3efb68def79f1e1a46793382776d
parent4ca1c3bbb76834c69b0d8e63c921ca3548f529ac (diff)
downloaddna-backup-63f156021298f710cb2c4fc460f046c366329a43.tar.gz
dna-backup-63f156021298f710cb2c4fc460f046c366329a43.zip
close some unclosed files
try to consistently fix windows tests
-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()
}