0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-22 06:00:00 +00:00

[utils] locked_file: Do not give executable bits for newly created files

Authored by: Lesmiscore
This commit is contained in:
Lesmiscore 2022-04-10 01:23:27 +09:00
parent 4abea8ca0a
commit 98804d034d
No known key found for this signature in database
GPG key ID: 0EC2B52CF86236FF

View file

@ -2236,7 +2236,7 @@ def __init__(self, filename, mode, block=True, encoding=None):
os.O_RDONLY if not writable else os.O_RDWR if readable else os.O_WRONLY,
))
self.f = os.fdopen(os.open(filename, flags), mode, encoding=encoding)
self.f = os.fdopen(os.open(filename, flags, 0o666), mode, encoding=encoding)
def __enter__(self):
exclusive = 'r' not in self.mode