Chore: should not write file on file provider

This commit is contained in:
Dreamacro 2020-07-18 19:32:40 +08:00
parent 3a3e2c05af
commit 6c7a8fffe0

View File

@ -74,9 +74,11 @@ func (f *fetcher) Initial() (interface{}, error) {
}
}
if f.vehicle.Type() != File {
if err := safeWrite(f.vehicle.Path(), buf); err != nil {
return nil, err
}
}
f.hash = md5.Sum(buf)