mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-12 03:29:10 +02:00
rename -> replace
This commit is contained in:
@@ -67,7 +67,7 @@ def atomic_symlink(destination: str, in_directory: str) -> str:
|
||||
tmpname = os.path.join(in_directory, f'{name}-{os.getpid()}-{time.monotonic()}')
|
||||
os.symlink(destination, tmpname)
|
||||
try:
|
||||
os.rename(tmpname, os.path.join(in_directory, name))
|
||||
os.replace(tmpname, os.path.join(in_directory, name))
|
||||
except OSError:
|
||||
os.unlink(tmpname)
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user