Add debugging to print hash values on failed hash comparison

This commit is contained in:
Nick Craig-Wood 2017-02-23 11:23:19 +00:00
parent 30e97ad9ec
commit e2f0feef3c

View file

@ -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
}