diff --git a/kitty/shell_integration.py b/kitty/shell_integration.py index 387889f34..8ca8826b1 100644 --- a/kitty/shell_integration.py +++ b/kitty/shell_integration.py @@ -3,7 +3,6 @@ import os -import time from contextlib import suppress from typing import Optional, Union, Dict @@ -60,18 +59,6 @@ def setup_bash_integration(env: Dict[str, str]) -> None: setup_integration('bash', os.path.expanduser('~/.bashrc')) -def atomic_symlink(destination: str, in_directory: str) -> None: - os.makedirs(in_directory, exist_ok=True) - name = os.path.basename(destination) - tmpname = os.path.join(in_directory, f'{name}-{os.getpid()}-{time.monotonic()}') - os.symlink(destination, tmpname) - try: - os.replace(tmpname, os.path.join(in_directory, name)) - except OSError: - os.unlink(tmpname) - raise - - def setup_fish_integration(env: Dict[str, str]) -> None: if 'XDG_DATA_DIRS' in env: val = env.get('XDG_DATA_DIRS', '')