mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 20:52:19 +00:00
rename -> replace
This commit is contained in:
parent
b293e4d516
commit
929e0c126d
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue