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

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 1200113004: win toolchain downloader: Don't omit hidden or system files. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 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 b06daf6c53f516647bb23e3b593e040165530236..c41ccc5a1f9c720c9f59f956f9c66afab4ef0284 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -48,22 +48,6 @@ except ImportError:
# on bare VM that doesn't have a full depot_tools.
pass
-if sys.platform != 'cygwin':
- import ctypes.wintypes
- GetFileAttributes = ctypes.windll.kernel32.GetFileAttributesW
- GetFileAttributes.argtypes = (ctypes.wintypes.LPWSTR,)
- GetFileAttributes.restype = ctypes.wintypes.DWORD
- FILE_ATTRIBUTE_HIDDEN = 0x2
- FILE_ATTRIBUTE_SYSTEM = 0x4
-
-
-def IsHidden(file_path):
- """Returns whether the given |file_path| has the 'system' or 'hidden'
- attribute set."""
- p = GetFileAttributes(file_path)
- assert p != 0xffffffff
- return bool(p & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
-
def GetFileList(root):
"""Gets a normalized list of files under |root|."""
@@ -72,7 +56,7 @@ def GetFileList(root):
file_list = []
for base, _, files in os.walk(root):
paths = [os.path.join(base, f) for f in files]
- file_list.extend(x.lower() for x in paths if not IsHidden(x))
+ file_list.extend(x.lower() for x in paths)
return sorted(file_list)
« 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