mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
gs/s3: remove useless os.IsNotExist check
This commit is contained in:
parent
579cd6dc64
commit
04d101fa94
@ -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
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user