"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
filter: fix deadlock with errors on --files-from
douchen7e2deffc621f
diff --git a/fs/filter/filter.go b/fs/filter/filter.goindex 156dbd4a7..736495f4d 100644--- a/fs/filter/filter.go+++ b/fs/filter/filter.go@@ -433,13 +433,13 @@ func (f *Filter) MakeListR(ctx context.Context, NewObject func(ctx context.Contevar (checkers = ci.Checkersremotes = make(chan string, checkers)- g errgroup.Group+ g, gCtx = errgroup.WithContext(ctx))for i := 0; i < checkers; i++ {g.Go(func() (err error) {var entries = make(fs.DirEntries, 1)for remote := range remotes {- entries[0], err = NewObject(ctx, remote)+ entries[0], err = NewObject(gCtx, remote)if err == fs.ErrorObjectNotFound {// Skip files that are not found} else if err != nil {@@ -454,8 +454,13 @@ func (f *Filter) MakeListR(ctx context.Context, NewObject func(ctx context.Contereturn nil})}+ outer:for remote := range f.files {- remotes <- remote+ select {+ case remotes <- remote:+ case <-gCtx.Done():+ break outer+ }}close(remotes)return g.Wait()diff --git a/fs/filter/filter_test.go b/fs/filter/filter_test.goindex 91723f0a0..7821cec74 100644--- a/fs/filter/filter_test.go+++ b/fs/filter/filter_test.go@@ -360,6 +360,15 @@ func TestNewFilterMakeListR(t *testing.T) {require.NoError(t, f.AddFile("error"))err = listR(context.Background(), "", listRcallback)require.EqualError(t, err, assert.AnError.Error())++ // The checker will exit by the error above+ ci := fs.GetConfig(context.Background())+ ci.Checkers = 1++ // Now check an error is returned from NewObject+ require.NoError(t, f.AddFile("error"))+ err = listR(context.Background(), "", listRcallback)+ require.EqualError(t, err, assert.AnError.Error())}func TestNewFilterMinSize(t *testing.T) {