RegTest: Check size before hash

This commit is contained in:
Stenzek 2024-09-22 20:43:09 +10:00
parent 206f32e511
commit cf32774b24
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -260,6 +260,9 @@ def write(line):
def compare_frames(path1, path2):
try:
if os.stat(path1).st_size != os.stat(path2).st_size:
return False
with open(path1, "rb") as f:
hash1 = hashlib.md5(f.read()).digest()
with open(path2, "rb") as f: