Skip to content

Commit

Permalink
Chore: should not write file on file provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Jul 18, 2020
1 parent 3a3e2c0 commit 6c7a8ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adapters/provider/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6c7a8ff

Please sign in to comment.