aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
authorSimon Sawicki <contact@grub4k.xyz>2023-01-25 22:32:07 +0100
committerSimon Sawicki <contact@grub4k.xyz>2023-01-25 22:32:07 +0100
commit37e325b92ff9d784715ac0e5d1f7d96bf5f45ad9 (patch)
tree3564a78c80b39de3157c92435907d33af8655f54 /yt_dlp/utils.py
parent59d7de0da545944c48a82fc2937b996d7cd8cc9c (diff)
downloadhypervideo-pre-37e325b92ff9d784715ac0e5d1f7d96bf5f45ad9.tar.lz
hypervideo-pre-37e325b92ff9d784715ac0e5d1f7d96bf5f45ad9.tar.xz
hypervideo-pre-37e325b92ff9d784715ac0e5d1f7d96bf5f45ad9.zip
[utils] Use local kernel32 for file locking on Windows
Ref: https://github.com/ytdl-org/youtube-dl/issues/21545 Authored by: Grub4K
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 15e1f97cb..458239a12 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -2106,7 +2106,7 @@ if sys.platform == 'win32':
('hEvent', ctypes.wintypes.HANDLE),
]
- kernel32 = ctypes.windll.kernel32
+ kernel32 = ctypes.WinDLL('kernel32')
LockFileEx = kernel32.LockFileEx
LockFileEx.argtypes = [
ctypes.wintypes.HANDLE, # hFile