From 1d0f19614b695aba36ad0fe0f8d3d87f68733b85 Mon Sep 17 00:00:00 2001 From: Alan Xiao Date: Fri, 25 Apr 2025 10:03:02 -0400 Subject: [PATCH] Update _utils.py Remove CLOCK$ as it is a valid filename in Win10. It was reserved in NT or older systems as referenced here: https://answers.microsoft.com/en-us/windows/forum/all/folder-names/2f9bb53a-da99-45e6-90f7-50d1399842aa. Testing on Win10 VM also shows that it's possible to create files/directories with it as a name. --- yt_dlp/utils/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index 4a598bfb45..99a67ba61f 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -168,7 +168,7 @@ def IDENTITY(x): NUMBER_RE = r'\d+(?:\.\d+)?' WINDOWS_RESERVED_NAMES = ( - 'CON', 'CONOUT$', 'CONIN$', 'PRN', 'AUX', 'CLOCK$', 'NUL', + 'CON', 'CONOUT$', 'CONIN$', 'PRN', 'AUX', 'NUL', *tuple(f'{name:s}{num:d}' for name, num in itertools.product(('COM', 'LPT'), range(10))), *tuple( f'{name:s}{ssd:s}'