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

This commit is contained in:
gVisor bot 2021-02-02 17:52:46 +08:00
parent 633de52aee
commit be4f6909de

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
} }