mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-20 01:42:50 +01:00
fix: default to False for params["windowsfilenames"] when absent
This commit is contained in:
parent
773b554bf5
commit
0ed18251d2
@ -1255,7 +1255,7 @@ def get_value(mdict):
|
||||
|
||||
def filename_sanitizer(key, value, restricted=self.params.get('restrictfilenames')):
|
||||
return sanitize_filename(
|
||||
str(value), self.params["windowsfilenames"], restricted=restricted, is_id=(
|
||||
str(value), self.params.get("windowsfilenames", False), restricted=restricted, is_id=(
|
||||
bool(re.search(r'(^|[_.])id(\.|$)', key))
|
||||
if 'filename-sanitization' in self.params['compat_opts']
|
||||
else NO_DEFAULT))
|
||||
|
@ -958,7 +958,7 @@ def _request_dump_filename(self, url, video_id):
|
||||
if len(basen) > trim_length:
|
||||
h = '___' + hashlib.md5(basen.encode('utf-8')).hexdigest()
|
||||
basen = basen[:trim_length - len(h)] + h
|
||||
filename = sanitize_filename(f'{basen}.dump', self.get_param("windowsfilenames"), restricted=True)
|
||||
filename = sanitize_filename(f'{basen}.dump', self.get_param("windowsfilenames", False), restricted=True)
|
||||
# Working around MAX_PATH limitation on Windows (see
|
||||
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx)
|
||||
if compat_os_name == 'nt':
|
||||
|
Loading…
Reference in New Issue
Block a user