Update the VS toolchain hash computation caching.

R=hans@chromium.org, scottmg@chromium.org
BUG=495204

Review-Url: https://codereview.chromium.org/2052533002
This commit is contained in:
sebmarchand
2016-06-08 10:25:54 -07:00
committed by Commit bot
parent f10bcf3238
commit e9013dbe6f

View File

@@ -165,6 +165,10 @@ def CalculateHash(root, expected_hash):
digest.update(path_without_hash.lower())
with open(path, 'rb') as f:
digest.update(f.read())
# Save the timestamp file if the calculated hash is the expected one.
if digest.hexdigest() == expected_hash:
SaveTimestampsAndHash(root, digest.hexdigest())
return digest.hexdigest()