From 71f1f3aa6481043527851ce377c528e78828641e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 8 Aug 2021 10:35:38 +0530 Subject: [PATCH] Atomic save should use the target of symlinks --- kitty/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kitty/config.py b/kitty/config.py index d07c65ab1..7639e0da7 100644 --- a/kitty/config.py +++ b/kitty/config.py @@ -36,6 +36,7 @@ def build_ansi_color_table(opts: Optional[Options] = None) -> int: def atomic_save(data: bytes, path: str) -> None: import tempfile + path = os.path.realpath(path) fd, p = tempfile.mkstemp(dir=os.path.dirname(path), suffix='.tmp') try: with os.fdopen(fd, 'wb') as f: