forked from TrueCloudLab/restic
checker: Fix S3 legacy layout detection
This commit is contained in:
parent
768c890fcb
commit
04e49924fb
1 changed files with 6 additions and 0 deletions
|
@ -14,6 +14,7 @@ import (
|
||||||
"github.com/minio/sha256-simd"
|
"github.com/minio/sha256-simd"
|
||||||
"github.com/restic/restic/internal/backend"
|
"github.com/restic/restic/internal/backend"
|
||||||
"github.com/restic/restic/internal/backend/s3"
|
"github.com/restic/restic/internal/backend/s3"
|
||||||
|
"github.com/restic/restic/internal/cache"
|
||||||
"github.com/restic/restic/internal/debug"
|
"github.com/restic/restic/internal/debug"
|
||||||
"github.com/restic/restic/internal/errors"
|
"github.com/restic/restic/internal/errors"
|
||||||
"github.com/restic/restic/internal/hashing"
|
"github.com/restic/restic/internal/hashing"
|
||||||
|
@ -193,6 +194,11 @@ func IsOrphanedPack(err error) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isS3Legacy(b restic.Backend) bool {
|
func isS3Legacy(b restic.Backend) bool {
|
||||||
|
// unwrap cache
|
||||||
|
if be, ok := b.(*cache.Backend); ok {
|
||||||
|
b = be.Backend
|
||||||
|
}
|
||||||
|
|
||||||
be, ok := b.(*s3.Backend)
|
be, ok := b.(*s3.Backend)
|
||||||
if !ok {
|
if !ok {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue