fix(s3): nil dereference when key isn't found

This commit is contained in:
Mustafa Gezen 2021-09-11 03:12:02 +02:00
parent 7c15c41a9f
commit 6483386e19
Signed by: mustafa
GPG Key ID: DCDF010D946438C1
1 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,8 @@ func (s *S3) Read(path string) ([]byte, error) {
if !ok || s3err.Code() != s3.ErrCodeNoSuchKey {
return nil, err
}
return nil, nil
}
body, err := ioutil.ReadAll(obj.Body)