mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
Adjust max filename length to fit Docker limits (#1)
Docker / AUFS has a NAME_MAX of 242.
This commit is contained in:
parent
cd9ff4ec5b
commit
43f0a3abc5
@ -597,9 +597,9 @@ class InfoExtractor(object):
|
||||
self._downloader.to_screen(dump)
|
||||
if self._downloader.params.get('write_pages', False):
|
||||
basen = '%s_%s' % (video_id, urlh.geturl())
|
||||
if len(basen) > 240:
|
||||
if len(basen) > 237:
|
||||
h = '___' + hashlib.md5(basen.encode('utf-8')).hexdigest()
|
||||
basen = basen[:240 - len(h)] + h
|
||||
basen = basen[:237 - len(h)] + h
|
||||
raw_filename = basen + '.dump'
|
||||
filename = sanitize_filename(raw_filename, restricted=True)
|
||||
self.to_screen('Saving request to ' + filename)
|
||||
|
Loading…
Reference in New Issue
Block a user