Merge pull request #622 from testwill/close_file

Missing close file in `WriteStream`.
This commit is contained in:
Michael Quigley 2024-06-20 10:56:06 -04:00 committed by GitHub
commit 20da267d24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,6 +124,7 @@ func (t *FilesystemTarget) WriteStream(path string, stream io.Reader, mode os.Fi
if err != nil {
return err
}
defer f.Close()
_, err = io.Copy(f, stream)
if err != nil {
return err