Commit 768996c0 by Jamie Madill

Add an error check to ANGLE DLL update script.

BUG=None Change-Id: I6fdcb8c436f35b9e3aa284760063f27e04e15a48 Reviewed-on: https://chromium-review.googlesource.com/350902Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent ac3575b2
......@@ -25,6 +25,8 @@ source_paths = [
os.path.join('..', 'out', 'Release_x64'),
]
script_dir = os.path.dirname(sys.argv[0])
# Default Canary installation path.
chrome_folder = os.path.join(os.environ['LOCALAPPDATA'], 'Google', 'Chrome SxS', 'Application')
......@@ -33,13 +35,16 @@ binary_name = 'libGLESv2.dll'
newest_folder = None
newest_mtime = None
for path in source_paths:
binary_path = os.path.join(path, binary_name)
binary_path = os.path.join(script_dir, path, binary_name)
if os.path.exists(binary_path):
binary_mtime = os.path.getmtime(binary_path)
if (newest_folder is None) or (binary_mtime > newest_mtime):
newest_folder = path
newest_folder = os.path.join(script_dir, path)
newest_mtime = binary_mtime
if newest_folder is None:
sys.exit("Could not find ANGLE DLLs!")
source_folder = newest_folder
# Is a folder a chrome binary directory?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment