1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-29 09:58:31 +00:00

Update _utils.py

More fixes.... I apologize for the excessive CI pipeline usage.
This commit is contained in:
Alan Xiao 2025-04-23 20:31:39 -04:00 committed by GitHub
parent 6b48a0e4b4
commit 8399e09e7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -701,7 +701,7 @@ def suffix_sanitize(match):
other = match.group(3) if match.group(3) else '' other = match.group(3) if match.group(3) else ''
if not match.group(2) and other: if not match.group(2) and other:
return match.group(1) + other return match.group(1) + other
return match.group(1) + '_res' + match.group(2) + other # suffix the reserved portion only return match.group(1) + '_res' + match.group(2) + other # suffix the reserved portion only
return re.sub(fr'{WINDOWS_RESERVED_NAMES_RE}(\.*)(.*$)', suffix_sanitize, s) return re.sub(fr'{WINDOWS_RESERVED_NAMES_RE}(\.*)(.*$)', suffix_sanitize, s)