mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-24 23:37:55 +01:00
This commit is contained in:
parent
45684945ea
commit
2688c14827
@ -1837,6 +1837,12 @@ def write_json_file(obj, fn):
|
|||||||
os.unlink(fn)
|
os.unlink(fn)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
mask = os.umask(0)
|
||||||
|
os.umask(mask)
|
||||||
|
os.chmod(tf.name, 0o666 & ~mask)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
os.rename(tf.name, fn)
|
os.rename(tf.name, fn)
|
||||||
except Exception:
|
except Exception:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user