summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-08 07:21:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-08 07:59:28 +0200
commit0a0d1c8c8b85b273caf4d272a155c432160ec6f2 (patch)
tree18c0ee7684eb7c870bc4b2f046acb2029e5d50ed
parentReduce file name length to make Windows happy (diff)
downloadrtems-source-builder-0a0d1c8c8b85b273caf4d272a155c432160ec6f2.tar.bz2
sb: Restrict file name length
-rw-r--r--source-builder/sb/download.py4
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
#