migrations: add temporary hack for s3_layout

The migration will be removed after the next restic release anyways.
Thus, there's no need for a clean implementation.
This commit is contained in:
Michael Eischer
2024-05-10 15:55:45 +02:00
parent 34d90aecf9
commit a1ca5e15c4
3 changed files with 19 additions and 4 deletions

View File

@@ -256,8 +256,10 @@ func isS3Legacy(b backend.Backend) bool {
func (c *Checker) Packs(ctx context.Context, errChan chan<- error) {
defer close(errChan)
if isS3Legacy(c.repo.Backend()) {
errChan <- ErrLegacyLayout
if r, ok := c.repo.(*repository.Repository); ok {
if isS3Legacy(repository.AsS3Backend(r)) {
errChan <- ErrLegacyLayout
}
}
debug.Log("checking for %d packs", len(c.packs))