kitty/kittens/transfer
Kovid Goyal ef58de6850
Transfer kitten: Replace existing links when receiving files
Receiving a regular file over an existing symlink or hard link used to
truncate and overwrite the file the link points to. Instead, write
received files to a temporary file in the destination directory and
atomically rename it into place once the transfer completes, as was
already done for delta transfers. This also means interrupted transfers
no longer leave truncated files behind.

If the destination directory is not writable, fall back to writing in
place, but only for regular files with a single link, so that no other
file can be affected.

Also use stat rather than lstat when deciding whether to use delta
transfers, so that symlinks to large files can use them, and remove
the temporary file of failed or aborted delta transfers.

Closes #10713
2026-10-21 20:35:07 +05:30
..
__init__.py
algorithm.c Cleanup previous PR 2026-10-09 18:37:48 +05:30
ftc.go Use SIMD base64 everywhere 2026-04-21 11:56:55 +05:30
ftc_test.go run modernize 2025-11-11 17:09:37 +05:30
main.go
main.py autoformat 2026-08-05 05:32:56 +05:30
receive.go Transfer kitten: Replace existing links when receiving files 2026-10-21 20:35:07 +05:30
receive_test.go Transfer kitten: Replace existing links when receiving files 2026-10-21 20:35:07 +05:30
rsync.pyi autoformat 2026-08-05 05:32:56 +05:30
send.go Transfer kitten: Clearer errors when the destination is a directory 2026-10-21 06:14:21 +05:30
send_test.go Transfer kitten: Clearer errors when the destination is a directory 2026-10-21 06:14:21 +05:30
utils.go
utils.py autoformat 2026-08-05 05:32:56 +05:30