mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user