Skip to content

Commit 9895a5c

Browse files
committed
Improve copy function error checking + delete make fuzz because of golang/go#52569
1 parent 1df5073 commit 9895a5c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ forcetest:
55
test:
66
HISHTORY_TEST=1 go test -p 1 ./...
77

8-
fuzz:
9-
HISHTORY_TEST=1 go test -p 1 -fuzz=FuzzTestMultipleUsers -run FuzzTestMultipleUsers client/client_test.go
10-
118
acttest:
129
act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64
1310

client/lib/lib.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,13 @@ func copyFile(src, dst string) error {
634634
if err != nil {
635635
return err
636636
}
637-
defer destination.Close()
637+
638638
_, err = io.Copy(destination, source)
639-
return err
639+
if err != nil {
640+
return err
641+
}
642+
643+
return destination.Close()
640644
}
641645

642646
func GetDownloadData() (shared.UpdateInfo, error) {

0 commit comments

Comments
 (0)