Commit 9e227d5b authored by dpranke@chromium.org's avatar dpranke@chromium.org

use "/" instead of path.sep in owners glob check

R=maruel@chromium.org
BUG=157022


Review URL: https://chromiumcodereview.appspot.com/11236018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163198 0039d316-1c4b-4281-b951-d872f2087c98
parent e3b1c3d1
......@@ -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",
......
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