mirror of
https://github.com/l1ving/youtube-dl
synced 2024-11-20 19:32:50 +08:00
This commit is contained in:
parent
9a269547f2
commit
9cd5f54e31
@ -1837,6 +1837,12 @@ def write_json_file(obj, fn):
|
||||
os.unlink(fn)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
mask = os.umask(0)
|
||||
os.umask(mask)
|
||||
os.chmod(tf.name, 0o666 & ~mask)
|
||||
except OSError:
|
||||
pass
|
||||
os.rename(tf.name, fn)
|
||||
except Exception:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user