mirror of
https://github.com/restic/restic.git
synced 2024-12-23 08:16:36 +00:00
azure: fix totally broken IsNotExist
This commit is contained in:
parent
3ebdadc58f
commit
579cd6dc64
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,6 @@ import (
|
||||||
"hash"
|
"hash"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -130,7 +129,8 @@ func (be *Backend) SetListMaxItems(i int) {
|
||||||
// IsNotExist returns true if the error is caused by a not existing file.
|
// IsNotExist returns true if the error is caused by a not existing file.
|
||||||
func (be *Backend) IsNotExist(err error) bool {
|
func (be *Backend) IsNotExist(err error) bool {
|
||||||
debug.Log("IsNotExist(%T, %#v)", err, err)
|
debug.Log("IsNotExist(%T, %#v)", err, err)
|
||||||
return os.IsNotExist(err)
|
var aerr storage.AzureStorageServiceError
|
||||||
|
return errors.As(err, &aerr) && aerr.StatusCode == http.StatusNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
// Join combines path components with slashes.
|
// Join combines path components with slashes.
|
||||||
|
|
Loading…
Reference in a new issue