From 6036fb63ba4f4cad5d821a27043f0fed239b8d6f Mon Sep 17 00:00:00 2001 From: Kr328 Date: Tue, 2 Feb 2021 17:52:46 +0800 Subject: [PATCH] Chore: avoid provider unnecessary write file operations (#1210) --- adapters/provider/fetcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/provider/fetcher.go b/adapters/provider/fetcher.go index 1e255118..3a351e9a 100644 --- a/adapters/provider/fetcher.go +++ b/adapters/provider/fetcher.go @@ -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 { return nil, err }