Implement placing of selected theme in kitty config dir

This commit is contained in:
Kovid Goyal
2021-08-07 15:04:32 +05:30
parent 2c96727c45
commit d01ac17334
3 changed files with 54 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ def atomic_save(data: bytes, path: str) -> None:
try:
with os.fdopen(fd, 'wb') as f:
f.write(data)
os.rename(p, path)
os.replace(p, path)
finally:
try:
os.remove(p)