Fix: http vehicle shouldn't save file

This commit is contained in:
Dreamacro 2019-12-30 23:01:24 +08:00
parent 9dda932494
commit b19a49335f

View file

@ -92,15 +92,12 @@ func (h *HTTPVehicle) Read() ([]byte, error) {
if err != nil {
return nil, err
}
buf, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
if err := ioutil.WriteFile(h.path, buf, fileMode); err != nil {
return nil, err
}
return buf, nil
}