mirror of
https://github.com/restic/restic.git
synced 2025-08-12 16:17:41 +00:00
@@ -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)
|
||||
|
Reference in New Issue
Block a user