修复下载插件bug

This commit is contained in:
hoteas 2022-08-31 19:15:47 +08:00
parent 3bb47de45a
commit f59e909d30
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ func Down(url, path, name string, e ...*Error) bool {
pix, err := ioutil.ReadAll(resp.Body)
_, err = io.Copy(out, bytes.NewReader(pix))
if err != nil && e[0] != nil {
if err != nil && len(e) != 0 {
e[0].SetError(err)
return false
}