mirror of
https://github.com/octoleo/restic.git
synced 2024-12-25 04:05:58 +00:00
check: cleanup s3 legacy detection
This commit is contained in:
parent
1dfd854769
commit
246559e654
@ -14,7 +14,6 @@ import (
|
||||
"github.com/minio/sha256-simd"
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/backend/s3"
|
||||
"github.com/restic/restic/internal/cache"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/hashing"
|
||||
@ -241,17 +240,8 @@ func IsOrphanedPack(err error) bool {
|
||||
}
|
||||
|
||||
func isS3Legacy(b backend.Backend) bool {
|
||||
// unwrap cache
|
||||
if be, ok := b.(*cache.Backend); ok {
|
||||
b = be.Backend
|
||||
}
|
||||
|
||||
be, ok := b.(*s3.Backend)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
return be.Layout.Name() == "s3legacy"
|
||||
be := backend.AsBackend[*s3.Backend](b)
|
||||
return be != nil && be.Layout.Name() == "s3legacy"
|
||||
}
|
||||
|
||||
// Packs checks that all packs referenced in the index are still available and
|
||||
|
Loading…
Reference in New Issue
Block a user