migrations: Fix S3 backend detection

This commit is contained in:
Michael Eischer
2023-04-08 12:53:43 +02:00
parent c934c99d41
commit 6042df075f
8 changed files with 63 additions and 14 deletions

View File

@@ -46,6 +46,8 @@ func (r rateLimitedBackend) Load(ctx context.Context, h restic.Handle, length in
})
}
func (r rateLimitedBackend) Unwrap() restic.Backend { return r.Backend }
type limitedReader struct {
io.Reader
writerTo io.WriterTo

View File

@@ -75,3 +75,5 @@ func (be *Backend) Close() error {
debug.Log(" close err %v", err)
return err
}
func (be *Backend) Unwrap() restic.Backend { return be.Backend }

View File

@@ -191,3 +191,7 @@ func (be *Backend) List(ctx context.Context, t restic.FileType, fn func(restic.F
return err
}
func (be *Backend) Unwrap() restic.Backend {
return be.Backend
}

View File

@@ -85,3 +85,7 @@ func (be *SemaphoreBackend) Remove(ctx context.Context, h restic.Handle) error {
return be.Backend.Remove(ctx, h)
}
func (be *SemaphoreBackend) Unwrap() restic.Backend {
return be.Backend
}