Adjust file name blacklist in patch.py

- allow the percent sign ('%')
- disallow characters from Windows blacklist https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#naming_conventions

BUG=467152

Review URL: https://codereview.chromium.org/1035193002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294591 0039d316-1c4b-4281-b951-d872f2087c98
parent 09156ec7
...@@ -50,7 +50,7 @@ class FilePatchBase(object): ...@@ -50,7 +50,7 @@ class FilePatchBase(object):
def _process_filename(filename): def _process_filename(filename):
filename = filename.replace('\\', '/') filename = filename.replace('\\', '/')
# Blacklist a few characters for simplicity. # Blacklist a few characters for simplicity.
for i in ('%', '$', '..', '\'', '"'): for i in ('$', '..', '\'', '"', '<', '>', ':', '|', '?', '*'):
if i in filename: if i in filename:
raise UnsupportedPatchFormat( raise UnsupportedPatchFormat(
filename, 'Can\'t use \'%s\' in filename.' % i) filename, 'Can\'t use \'%s\' in filename.' % i)
......
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