mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 22:11:05 +00:00
parent
0edb3e336c
commit
8973767198
1 changed files with 4 additions and 0 deletions
|
@ -683,6 +683,10 @@ def sanitize_open(filename, open_mode):
|
||||||
for attempt in range(2):
|
for attempt in range(2):
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
# FIXME: Windows only has mandatory locking which also locks the file from being read.
|
||||||
|
# So for now, don't lock the file on windows. Ref: https://github.com/yt-dlp/yt-dlp/issues/3124
|
||||||
|
raise LockingUnsupportedError()
|
||||||
stream = locked_file(filename, open_mode, block=False).__enter__()
|
stream = locked_file(filename, open_mode, block=False).__enter__()
|
||||||
except LockingUnsupportedError:
|
except LockingUnsupportedError:
|
||||||
stream = open(filename, open_mode)
|
stream = open(filename, open_mode)
|
||||||
|
|
Loading…
Reference in a new issue