fix: 修复分块上传文件资源未释放问题 (#5109)

This commit is contained in:
Node
2024-05-24 11:52:40 +08:00
committed by wanghe-fit2cloud
parent 73e901bb94
commit 508e2ec372
+1 -1
View File
@@ -609,7 +609,7 @@ func mergeChunks(fileName string, fileDir string, dstDir string, chunkCount int)
if err != nil {
return err
}
defer targetFile.Close()
for i := 0; i < chunkCount; i++ {
chunkPath := filepath.Join(fileDir, fmt.Sprintf("%s.%d", fileName, i))
chunkData, err := os.ReadFile(chunkPath)