Improve copy function error checking + delete make fuzz because of https://github.com/golang/go/issues/52569

This commit is contained in:
David Dworken 2022-09-22 23:20:21 -07:00
parent 1df50731be
commit 9895a5c677
2 changed files with 6 additions and 5 deletions

View File

@ -5,9 +5,6 @@ forcetest:
test:
HISHTORY_TEST=1 go test -p 1 ./...
fuzz:
HISHTORY_TEST=1 go test -p 1 -fuzz=FuzzTestMultipleUsers -run FuzzTestMultipleUsers client/client_test.go
acttest:
act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64

View File

@ -634,9 +634,13 @@ func copyFile(src, dst string) error {
if err != nil {
return err
}
defer destination.Close()
_, err = io.Copy(destination, source)
return err
if err != nil {
return err
}
return destination.Close()
}
func GetDownloadData() (shared.UpdateInfo, error) {