diff --git a/s3tests/realistic.py b/s3tests/realistic.py index 36abf44..e5d234b 100644 --- a/s3tests/realistic.py +++ b/s3tests/realistic.py @@ -78,6 +78,9 @@ class FileVerifier(object): Returns True if this file looks valid. The file is valid if the end of the file has the md5 digest for the first part of the file. """ + if self.size < self.hash.digest_size: + return self.hash.digest().startswith(self.buf) + return self.buf == self.hash.digest() def files(mean, stddev, seed=None):