mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
plugins_mirror should not rely on getcwdu
This commit is contained in:
parent
22b1a4843b
commit
f4cf168a72
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user