gs/s3: remove useless os.IsNotExist check

This commit is contained in:
Michael Eischer 2022-12-03 18:15:11 +01:00
parent 579cd6dc64
commit 04d101fa94
2 changed files with 0 additions and 8 deletions

View File

@ -170,11 +170,6 @@ func (be *Backend) SetListMaxItems(i int) {
// IsNotExist returns true if the error is caused by a not existing file.
func (be *Backend) IsNotExist(err error) bool {
debug.Log("IsNotExist(%T, %#v)", err, err)
if os.IsNotExist(err) {
return true
}
var gerr *googleapi.Error
return errors.As(err, &gerr) && gerr.Code == 404
}

View File

@ -170,9 +170,6 @@ func isAccessDenied(err error) bool {
// IsNotExist returns true if the error is caused by a not existing file.
func (be *Backend) IsNotExist(err error) bool {
debug.Log("IsNotExist(%T, %#v)", err, err)
if errors.Is(err, os.ErrNotExist) {
return true
}
var e minio.ErrorResponse
return errors.As(err, &e) && e.Code == "NoSuchKey"