Chore: avoid provider unnecessary write file operations (#1210)

This commit is contained in:
Kr328 2021-02-02 17:52:46 +08:00 committed by GitHub
parent cd48f69b1f
commit 6036fb63ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@ func (f *fetcher) Initial() (interface{}, error) {
} }
} }
if f.vehicle.Type() != File { if f.vehicle.Type() != File && !isLocal {
if err := safeWrite(f.vehicle.Path(), buf); err != nil { if err := safeWrite(f.vehicle.Path(), buf); err != nil {
return nil, err return nil, err
} }