1
mirror of https://github.com/rclone/rclone synced 2024-11-02 23:09:23 +01:00

check: make check command obey --dry-run/-i/--interactive - fixes #4325

This commit is contained in:
Nick Craig-Wood 2020-06-10 12:48:03 +01:00
parent 5866b1b017
commit 63cf0b1cdd

View File

@ -830,6 +830,9 @@ func (c *checkMarch) Match(ctx context.Context, dst, src fs.DirEntry) (recurse b
case fs.Object: case fs.Object:
dstX, ok := dst.(fs.Object) dstX, ok := dst.(fs.Object)
if ok { if ok {
if SkipDestructive(ctx, src, "check") {
return false
}
differ, noHash := c.checkIdentical(ctx, dstX, srcX) differ, noHash := c.checkIdentical(ctx, dstX, srcX)
if differ { if differ {
atomic.AddInt32(&c.differences, 1) atomic.AddInt32(&c.differences, 1)