Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 2039563002: Make "vs_toolchain.py update" work on case-sensitive file systems (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Windows hosts still need p to be lowered Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win_toolchain/get_toolchain_if_necessary.py
diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py
index 5ef3246f8a2db32d6c4217f99bfea472c5d0a1e6..37a3207d8836d5840a6630a3afe9f71d0bacd5aa 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -76,16 +76,20 @@ def GetFileList(root):
# they crash. Also ignores the content of the win_sdk/debuggers/x(86|64)/sym/
# directories as this is just the temporarily location that Windbg might use
# to store the symbol files.
+ #
+ # Note: These files are only created on a Windows host, so the
+ # ignored_directories list isn't relevant on non-Windows hosts.
+
ignored_directories = ['wer\\reportqueue',
'win_sdk\\debuggers\\x86\\sym\\',
'win_sdk\\debuggers\\x64\\sym\\']
for base, _, files in os.walk(root):
- paths = [os.path.join(base, f).lower() for f in files]
+ paths = [os.path.join(base, f) for f in files]
for p in paths:
- if any(ignored_dir in p for ignored_dir in ignored_directories):
+ if any(ignored_dir in p.lower() for ignored_dir in ignored_directories):
continue
file_list.append(p)
- return sorted(file_list, key=lambda s: s.replace('/', '\\'))
+ return sorted(file_list, key=lambda s: s.replace('/', '\\').lower())
def MakeTimestampsFileName(root, sha1):
@@ -158,7 +162,7 @@ def CalculateHash(root, expected_hash):
if expected_hash:
path_without_hash = path_without_hash.replace(
os.path.join(root, expected_hash).replace('/', '\\'), root)
- digest.update(path_without_hash)
+ digest.update(path_without_hash.lower())
scottmg 2016/06/06 16:39:22 I don't really remember what the data looks like n
scottmg 2016/06/06 16:40:56 Oh, I missed the old lower(). I'm probably not the
with open(path, 'rb') as f:
digest.update(f.read())
return digest.hexdigest()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698