Skip to content

Commit

Permalink
Fix redist glob to work on Linux
Browse files Browse the repository at this point in the history
Recent Windows 10 SDKs store the UCRT redist files in a different
directory so a change was landed to scan for the right directory to
handle old and new. However the glob call used a backslash and therefore
fails on Linux. This fixes that by using os.path.join.

Bug: 915036
Change-Id: I7f71b0e9300ac33964a05881525a5eba52203859
Reviewed-on: https://chromium-review.googlesource.com/c/1377503
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617227}
  • Loading branch information
randomascii authored and Commit Bot committed Dec 17, 2018
1 parent 97b2cb2 commit 0778ef5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/vs_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _CopyUCRTRuntime(target_dir, source_dir, target_cpu, dll_pattern, suffix):
# Starting with the 10.0.17763 SDK the ucrt files are in a version-named
# directory - this handles both cases.
redist_dir = os.path.join(win_sdk_dir, 'Redist')
version_dirs = glob.glob(redist_dir + r'\10.*')
version_dirs = glob.glob(os.path.join(redist_dir, '10.*'))
if len(version_dirs) > 0:
version_dirs.sort(reverse=True)
redist_dir = version_dirs[0]
Expand Down
2 changes: 1 addition & 1 deletion build/win/copy_cdb_to_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _CopyCDBToOutput(output_dir, target_arch):
# Starting with the 10.0.17763 SDK the ucrt files are in a version-named
# directory - this handles both cases.
redist_dir = os.path.join(win_sdk_dir, 'Redist')
version_dirs = glob.glob(redist_dir + r'\10.*')
version_dirs = glob.glob(os.path.join(redist_dir, '10.*'))
if len(version_dirs) > 0:
version_dirs.sort(reverse=True)
redist_dir = version_dirs[0]
Expand Down

0 comments on commit 0778ef5

Please sign in to comment.