5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 06:32:10 +08:00

fix: close copy dst file (#3384)

* fix: close copy dst file

Signed-off-by: guoguangwu <guoguangwug@gmail.com>

* Update website/src/pages/changelog.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Co-authored-by: Travis McLane <tmclane@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
guangwu 2024-04-10 06:34:43 +08:00 committed by GitHub
parent aad811391b
commit faf36e8634
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -152,6 +152,7 @@ func COPY(source string, target string) {
defer closefile(src)
d, err := os.Create(target)
checkError(err)
defer closefile(d)
_, err = io.Copy(d, src)
checkError(err)
}

View File

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added mac option `DisableZoom` to remove zoom button. Added by @wizzymore in [PR](https://github.com/wailsapp/wails/pull/3289)
- Changed Create a project with changing the default name to the projects name. Changed by [@Twacqwq](https://github.com/Twacqwq) in [PR](https://github.com/wailsapp/wails/pull/3303)
- Fix some typos in comments. Changed by [@reallylowest](https://github.com/reallylowest) in [PR](https://github.com/wailsapp/wails/pull/3357)
- Fixed an issue where the destination file was not properly closed after copying. Changed by [@testwill](https://github.com/testwill) in [PR](https://github.com/wailsapp/wails/pull/3384)
## v2.8.0 - 2024-02-08