From 6c7a8fffe09f5fede1cbc10d2814e3757d7e5613 Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Sat, 18 Jul 2020 19:32:40 +0800 Subject: [PATCH] Chore: should not write file on file provider --- adapters/provider/fetcher.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/adapters/provider/fetcher.go b/adapters/provider/fetcher.go index 3cbf5fbe1..c0f18c012 100644 --- a/adapters/provider/fetcher.go +++ b/adapters/provider/fetcher.go @@ -74,8 +74,10 @@ func (f *fetcher) Initial() (interface{}, error) { } } - if err := safeWrite(f.vehicle.Path(), buf); err != nil { - return nil, err + if f.vehicle.Type() != File { + if err := safeWrite(f.vehicle.Path(), buf); err != nil { + return nil, err + } } f.hash = md5.Sum(buf)