Compare commits

..

1 commit

Author SHA1 Message Date
495f745535 [#142] Fix multipart-objects download
All checks were successful
/ DCO (pull_request) Successful in 1m3s
/ Vulncheck (pull_request) Successful in 1m31s
/ Builds (pull_request) Successful in 1m6s
/ Lint (pull_request) Successful in 2m10s
/ Tests (pull_request) Successful in 1m11s
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-10-15 17:17:29 +03:00

View file

@ -173,8 +173,8 @@ func (x *MultiObjectReader) Read(p []byte) (n int, err error) {
if x.curReader != nil { if x.curReader != nil {
n, err = x.curReader.Read(p) n, err = x.curReader.Read(p)
if err != nil { if err != nil {
if err := x.curReader.Close(); err != nil { if closeErr := x.curReader.Close(); closeErr != nil {
return n, err return n, fmt.Errorf("%w (close err: %v)", err, closeErr)
} }
} }
if !errors.Is(err, io.EOF) { if !errors.Is(err, io.EOF) {