Skip to content

Commit

Permalink
fix: close copy dst file
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Apr 9, 2024
1 parent bde4e5b commit e8de008
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions v2/internal/s/s.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit e8de008

Please sign in to comment.