fix: close file

Signed-off-by: guangwu <guoguangwug@gmail.com>
This commit is contained in:
guangwu 2024-05-08 18:10:01 +08:00 committed by GitHub
parent 7a460179ea
commit a99b50ecfa
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 { if err != nil {
return err return err
} }
defer f.Close()
_, err = io.Copy(f, stream) _, err = io.Copy(f, stream)
if err != nil { if err != nil {
return err return err