forked from golang/hotime
修复下载插件bug
This commit is contained in:
parent
3bb47de45a
commit
f59e909d30
@ -32,7 +32,7 @@ func Down(url, path, name string, e ...*Error) bool {
|
|||||||
|
|
||||||
pix, err := ioutil.ReadAll(resp.Body)
|
pix, err := ioutil.ReadAll(resp.Body)
|
||||||
_, err = io.Copy(out, bytes.NewReader(pix))
|
_, err = io.Copy(out, bytes.NewReader(pix))
|
||||||
if err != nil && e[0] != nil {
|
if err != nil && len(e) != 0 {
|
||||||
e[0].SetError(err)
|
e[0].SetError(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user