From 63cf0b1cdd921a43474f074e36fc6edde7995381 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 10 Jun 2020 12:48:03 +0100 Subject: [PATCH] check: make check command obey --dry-run/-i/--interactive - fixes #4325 --- fs/operations/operations.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/operations/operations.go b/fs/operations/operations.go index 413745874..7c51cff65 100644 --- a/fs/operations/operations.go +++ b/fs/operations/operations.go @@ -830,6 +830,9 @@ func (c *checkMarch) Match(ctx context.Context, dst, src fs.DirEntry) (recurse b case fs.Object: dstX, ok := dst.(fs.Object) if ok { + if SkipDestructive(ctx, src, "check") { + return false + } differ, noHash := c.checkIdentical(ctx, dstX, srcX) if differ { atomic.AddInt32(&c.differences, 1)