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

check: fix --one-way recursing more directories than it needs to

Nick Craig-Wood50bb9b7bddfd
diff --git a/fs/operations/operations.go b/fs/operations/operations.go
index 9e269b72f..0df993486 100644
--- a/fs/operations/operations.go
+++ b/fs/operations/operations.go
@@ -721,6 +721,9 @@ func (c *checkMarch) DstOnly(dst fs.DirEntry) (recurse bool) {
atomic.AddInt32(&c.srcFilesMissing, 1)
case fs.Directory:
// Do the same thing to the entire contents of the directory
+ if c.oneway {
+ return false
+ }
return true
default:
panic("Bad object in DirEntries")