From e2f0feef3cf4ff5a15312b5f02e5f7e71ad7ecd8 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 23 Feb 2017 11:23:19 +0000 Subject: [PATCH] Add debugging to print hash values on failed hash comparison --- fs/operations.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/operations.go b/fs/operations.go index a856e6f82..785ca2b1b 100644 --- a/fs/operations.go +++ b/fs/operations.go @@ -88,6 +88,10 @@ func CheckHashes(src, dst Object) (equal bool, hash HashType, err error) { if dstHash == "" { return true, HashNone, nil } + if srcHash != dstHash { + Debugf(src, "%v = %s (%v)", hash, srcHash, src.Fs()) + Debugf(dst, "%v = %s (%v)", hash, dstHash, dst.Fs()) + } return srcHash == dstHash, hash, nil }