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
changes/01/332501/1
phajdan.jr@chromium.org 10 years ago
parent 09156ec714
commit ca85801d15

@ -50,7 +50,7 @@ class FilePatchBase(object):
def _process_filename(filename):
filename = filename.replace('\\', '/')
# Blacklist a few characters for simplicity.
for i in ('%', '$', '..', '\'', '"'):
for i in ('$', '..', '\'', '"', '<', '>', ':', '|', '?', '*'):
if i in filename:
raise UnsupportedPatchFormat(
filename, 'Can\'t use \'%s\' in filename.' % i)

Loading…
Cancel
Save