Skip to content

Commit

Permalink
Improve copy function error checking + delete make fuzz because of go…
Browse files Browse the repository at this point in the history
  • Loading branch information
ddworken committed Sep 23, 2022
1 parent 1df5073 commit 9895a5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions client/lib/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9895a5c

Please sign in to comment.