mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 03:18:55 +00:00
backend.LoadAll: Check errors from io.Copy()
This commit is contained in:
parent
63870d2830
commit
b84e63d503
@ -14,8 +14,12 @@ func LoadAll(be restic.Backend, h restic.Handle) (buf []byte, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
io.Copy(ioutil.Discard, rd)
|
_, e := io.Copy(ioutil.Discard, rd)
|
||||||
e := rd.Close()
|
if err == nil {
|
||||||
|
err = e
|
||||||
|
}
|
||||||
|
|
||||||
|
e = rd.Close()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = e
|
err = e
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user