diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-08 07:21:07 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-08 07:59:28 +0200 |
commit | 0a0d1c8c8b85b273caf4d272a155c432160ec6f2 (patch) | |
tree | 18c0ee7684eb7c870bc4b2f046acb2029e5d50ed | |
parent | Reduce file name length to make Windows happy (diff) | |
download | rtems-source-builder-0a0d1c8c8b85b273caf4d272a155c432160ec6f2.tar.bz2 |
sb: Restrict file name length
-rw-r--r-- | source-builder/sb/download.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py index dd7880d..ea7f4f4 100644 --- a/source-builder/sb/download.py +++ b/source-builder/sb/download.py @@ -184,6 +184,10 @@ def _http_parser(source, pathkey, config, opts): # Wipe out everything special in the file name. # source['file'] = re.sub(r'[^a-zA-Z0-9.\-]+', '-', source['file']) + max_file_len = 127 + if len(source['file']) > max_file_len: + raise error.general('file name length is greater than %i (maybe use --rsb-file=FILE option): %s' % \ + (max_file_len, source['file'])) # # Check local path # |