diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-14 17:25:05 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-14 17:25:05 +0200 |
commit | 63f156021298f710cb2c4fc460f046c366329a43 (patch) | |
tree | c2cfa7c0573c3efb68def79f1e1a46793382776d | |
parent | 4ca1c3bbb76834c69b0d8e63c921ca3548f529ac (diff) | |
download | dna-backup-63f156021298f710cb2c4fc460f046c366329a43.tar.gz dna-backup-63f156021298f710cb2c4fc460f046c366329a43.zip |
close some unclosed files
try to consistently fix windows tests
-rw-r--r-- | repo.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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() } |