Skip to content

Commit 50bb9b7

Browse files
committed
check: fix --one-way recursing more directories than it needs to
Before this change rclone traversed all directories in the destination. After this change rclone doesn't traverse directories in the destination that don't exist in the source if the `--one-way` flag is set. See: https://forum.rclone.org/t/check-with-one-way-flag-should-not-traverses-all-destination-directories/13263
1 parent 4537d9b commit 50bb9b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/operations/operations.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,9 @@ func (c *checkMarch) DstOnly(dst fs.DirEntry) (recurse bool) {
721721
atomic.AddInt32(&c.srcFilesMissing, 1)
722722
case fs.Directory:
723723
// Do the same thing to the entire contents of the directory
724+
if c.oneway {
725+
return false
726+
}
724727
return true
725728
default:
726729
panic("Bad object in DirEntries")

0 commit comments

Comments
 (0)