diff --git a/v2/internal/s/s.go b/v2/internal/s/s.go index f363d6541..5ba0d2eaa 100644 --- a/v2/internal/s/s.go +++ b/v2/internal/s/s.go @@ -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) } diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index e2d43c8f2..38ade30b7 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -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 project’s 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