plugins_mirror should not rely on getcwdu

This commit is contained in:
Kovid Goyal 2019-04-23 10:34:37 +05:30
parent 22b1a4843b
commit f4cf168a72
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -380,7 +380,7 @@ def log(*args, **kwargs):
def atomic_write(raw, name):
with tempfile.NamedTemporaryFile(dir=os.getcwdu(), delete=False) as f:
with tempfile.NamedTemporaryFile(dir=os.getcwd(), delete=False) as f:
f.write(raw)
os.fchmod(f.fileno(), stat.S_IREAD|stat.S_IWRITE|stat.S_IRGRP|stat.S_IROTH)
os.rename(f.name, name)