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

Unified Diff: owners.py

Issue 11236018: use "/" instead of path.sep in owners glob check (Closed) Base URL: https://git.chromium.org/chromium/tools/depot_tools.git@master
Patch Set: fix lint error Created 8 years, 2 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: owners.py
diff --git a/owners.py b/owners.py
index e0b4e07b5e9ab2e1c916e104b743982d743a9cc8..1dd467f6ff7d7cf30a880a45fc9a661f43ec435c 100644
--- a/owners.py
+++ b/owners.py
@@ -224,9 +224,10 @@ class Database(object):
glob_string = m.group(1)
directive = m.group(2)
full_glob_string = self.os_path.join(self.root, dirpath, glob_string)
- if self.os_path.sep in glob_string:
+ if '/' in glob_string or '\\' in glob_string:
raise SyntaxErrorInOwnersFile(owners_path, lineno,
- 'per-file globs cannot span directories: "%s"' % line)
+ 'per-file globs cannot span directories or use escapes: "%s"' %
+ line)
baselines = self.glob(full_glob_string)
for baseline in (self.os_path.relpath(b, self.root) for b in baselines):
self._add_entry(baseline, directive, "per-file line",
« 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