From 0319b898f8638329ae86d0153fdd1c5fae4aca8f Mon Sep 17 00:00:00 2001 From: guangwu Date: Mon, 20 May 2024 15:26:26 +0800 Subject: [PATCH] fix: close target file --- sqle/utils/file.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sqle/utils/file.go b/sqle/utils/file.go index f4dd0edc99..d09b984286 100644 --- a/sqle/utils/file.go +++ b/sqle/utils/file.go @@ -63,6 +63,7 @@ func SaveFile(file io.ReadSeeker, targetPath string) (err error) { if err != nil { return err } + defer target.Close() // 保存文件 _, err = io.Copy(target, file)