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

Unified Diff: tools/checkperms/checkperms.py

Issue 587463002: checkperms: Recognize "#! /path" as a file that has a shabang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « third_party/libxslt/xslt-config.in ('k') | tools/json_schema_compiler/idl_schema.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/checkperms/checkperms.py
diff --git a/tools/checkperms/checkperms.py b/tools/checkperms/checkperms.py
index 12c729e5b83839e1fde241d07a941d4af180f258..e2807c73c58b394f72f08b714a8840ba022b5132 100755
--- a/tools/checkperms/checkperms.py
+++ b/tools/checkperms/checkperms.py
@@ -270,7 +270,7 @@ def has_shebang_or_is_elf(full_path):
"""
with open(full_path, 'rb') as f:
data = f.read(4)
- return (data[:3] == '#!/', data == '\x7fELF')
+ return (data[:3] == '#!/' or data == '#! /', data == '\x7fELF')
def check_file(root_path, rel_path):
« no previous file with comments | « third_party/libxslt/xslt-config.in ('k') | tools/json_schema_compiler/idl_schema.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698