lib/scanner: Test weak hash consistency (ref #5556) (#6794)

Relevant much earlier changes:
  9b1c592fb7
  bd1c29ee32

Make sure vanilla and rolling adler are consistent. And that they match
with scanner.Validate.
This commit is contained in:
Simon Frei
2020-06-25 14:47:35 +02:00
committed by GitHub
parent 57f47bcf83
commit 90e248615f
2 changed files with 17 additions and 5 deletions
+1 -1
View File
@@ -1525,7 +1525,7 @@ func (m *model) Request(deviceID protocol.DeviceID, folder, name string, size in
if !scanner.Validate(res.data, hash, weakHash) {
m.recheckFile(deviceID, folder, name, offset, hash)
l.Debugf("%v REQ(in) failed validating data (%v): %s: %q / %q o=%d s=%d", m, err, deviceID, folder, name, offset, size)
l.Debugf("%v REQ(in) failed validating data: %s: %q / %q o=%d s=%d", m, deviceID, folder, name, offset, size)
return nil, protocol.ErrNoSuchFile
}