When dragging an empty file (or a directory containing an empty file) from a remote Linux machine to macOS Finder, the empty file would not be copied. Root cause: in add_payload() in dnd.c, the file is only created with O_CREAT when payload data arrives. For an empty file, no payload is ever sent, so the file was never created on disk. When Finder then tried to hard-link the (non-existent) temp file to the destination, it failed silently. Fix: in the "all data received" handler for type 0 (regular file), check if the fd was ever opened. If not (empty file), create the empty file explicitly before finishing. Also add: - A new test probe drag_remote_item_path:N to retrieve the filesystem path of a specific remote item by URI index. - Two regression tests: test_remote_drag_empty_file (verifying the empty file is created on disk) and test_remote_drag_dir_with_empty_file (verifying an empty child file inside a directory is created on disk). Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/da8b4577-3de8-4784-afc0-c1967f605dec Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atexit.py | ||
| CascadiaCode-Regular.otf | ||
| check_build.py | ||
| clipboard.py | ||
| ComfyCode-Regular.ttf | ||
| command_palette.py | ||
| completion.py | ||
| crypto.py | ||
| datatypes.py | ||
| dnd.py | ||
| dnd_kitten.py | ||
| file_transmission.py | ||
| FiraCode-Medium.otf | ||
| fonts.py | ||
| glfw.py | ||
| gr.py | ||
| GraphemeBreakTest.json | ||
| graphics.py | ||
| iosevka-regular.ttf | ||
| keys.py | ||
| layout.py | ||
| LiberationMono-Regular.ttf | ||
| main.py | ||
| mouse.py | ||
| multicell.py | ||
| notifications.py | ||
| open_actions.py | ||
| options.py | ||
| panels.py | ||
| parser.py | ||
| screen.py | ||
| search_query_parser.py | ||
| shell_integration.py | ||
| shm.py | ||
| ssh.py | ||
| tui.py | ||
| twemoji_smiley-cff2_colr_1.otf | ||
| utmp.py | ||