mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
gs: check against the correct error in IsNotExist
This commit is contained in:
parent
04d101fa94
commit
2f934f5803
@ -170,8 +170,7 @@ 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)
|
||||
var gerr *googleapi.Error
|
||||
return errors.As(err, &gerr) && gerr.Code == 404
|
||||
return errors.Is(err, storage.ErrObjectNotExist)
|
||||
}
|
||||
|
||||
// Join combines path components with slashes.
|
||||
|
Loading…
Reference in New Issue
Block a user