parent
42a8c19aae
commit
7d8765a937
12 changed files with 49 additions and 15 deletions
|
@ -409,7 +409,7 @@ func (be *Backend) List(ctx context.Context, t restic.FileType) <-chan string {
|
|||
debug.Log("listing %v", t)
|
||||
ch := make(chan string)
|
||||
|
||||
prefix := be.Dirname(restic.Handle{Type: t})
|
||||
prefix, recursive := be.Basedir(t)
|
||||
|
||||
// make sure prefix ends with a slash
|
||||
if prefix[len(prefix)-1] != '/' {
|
||||
|
@ -419,7 +419,7 @@ func (be *Backend) List(ctx context.Context, t restic.FileType) <-chan string {
|
|||
// NB: unfortunately we can't protect this with be.sem.GetToken() here.
|
||||
// Doing so would enable a deadlock situation (gh-1399), as ListObjects()
|
||||
// starts its own goroutine and returns results via a channel.
|
||||
listresp := be.client.ListObjects(be.cfg.Bucket, prefix, true, ctx.Done())
|
||||
listresp := be.client.ListObjects(be.cfg.Bucket, prefix, recursive, ctx.Done())
|
||||
|
||||
go func() {
|
||||
defer close(ch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue