Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

march: fix --no-traverse being very slow - fixes #8860

Nick Craig-Woodb272c50c4cf8
diff --git a/fs/march/march.go b/fs/march/march.go
index 841ca4cc7..8b19baa6e 100644
--- a/fs/march/march.go
+++ b/fs/march/march.go
@@ -455,6 +455,11 @@ func (m *March) processJob(job listDirJob) ([]listDirJob, error) {
go func() {
defer workerWg.Done()
for t := range matchTasks {
+ // Can't match directories with NewObject
+ if _, ok := t.src.(fs.Object); !ok {
+ t.dstMatch <- nil
+ continue
+ }
leaf := path.Base(t.src.Remote())
dst, err := m.Fdst.NewObject(m.Ctx, path.Join(job.dstRemote, leaf))
if err != nil {