Commit d6d7a050 authored by Chris Blume's avatar Chris Blume Committed by LUCI CQ

Replace hard-coded '\\' with os.path.sep

Currently, the Windows-specific path separated is hard-coded in many locations.

This CL replaces several of them with os.path.sep to be less fragile.

Change-Id: Ib8ffca5743254949808a6b67e4915f8f01e044e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3470977
Auto-Submit: Chris Blume <cblume@chromium.org>
Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent f72b1baf
......@@ -78,9 +78,9 @@ def ExpandWildcards(root, sub_dir):
def BuildRepackageFileList(src_dir):
# Strip off a trailing slash if present
if src_dir.endswith('\\'):
src_dir = src_dir[:-1]
# Strip off a trailing separator if present
if src_dir.endswith(os.path.sep):
src_dir = src_dir[:-len(os.path.sep)]
# Ensure .\Windows Kits\10\Debuggers exists and fail to repackage if it
# doesn't.
......@@ -311,8 +311,8 @@ def GenerateSetEnvCmd(target_dir):
])
# x86. Always use amd64_x86 cross, not x86 on x86.
env['VCToolsInstallDir'] = [vc_tools_parts[:]]
# Yuck: This one ends in a slash as well.
env['VCToolsInstallDir'][0][-1] += '\\'
# Yuck: This one ends in a path separator as well.
env['VCToolsInstallDir'][0][-1] += os.path.sep
env_x86 = collections.OrderedDict([
(
'PATH',
......
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