mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Fix empty dir double-finalization and remote_item_write_id reset bugs
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/24185546-c2b4-44e6-8649-a06dc6d1491d Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
This commit is contained in:
parent
8fbe867afb
commit
9324bd6276
1 changed files with 4 additions and 1 deletions
|
|
@ -395,7 +395,9 @@ func (dnd *dnd) send_remote_dir(path string, idx_in_uri_list, parent_dir_handle,
|
|||
names = append(names, entry.Name())
|
||||
}
|
||||
payload := utils.UnsafeStringToBytes(strings.Join(names, "\x00"))
|
||||
dnd.send_remote_item_payload(parent_dir_handle, idx, idx_in_uri_list, handle, payload)
|
||||
if len(payload) > 0 {
|
||||
dnd.send_remote_item_payload(parent_dir_handle, idx, idx_in_uri_list, handle, payload)
|
||||
}
|
||||
dnd.drag_status.remote_item_write_id = dnd.send_remote_item_payload(parent_dir_handle, idx, idx_in_uri_list, handle, nil)
|
||||
return
|
||||
}
|
||||
|
|
@ -442,6 +444,7 @@ func (dnd *dnd) next_remote_item() (err error) {
|
|||
if len(dnd.drag_status.remote_items) < 1 {
|
||||
// current remote data request finished
|
||||
dnd.drag_status.remote_data_requests = dnd.drag_status.remote_data_requests[1:]
|
||||
dnd.drag_status.remote_item_write_id = 0
|
||||
if len(dnd.drag_status.remote_data_requests) > 0 {
|
||||
return dnd.send_next_remote_data_request()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue