diff --git a/dri/download/download.go b/dri/download/download.go index ede6a81..c64a112 100644 --- a/dri/download/download.go +++ b/dri/download/download.go @@ -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 }