This commit is contained in:
Kovid Goyal 2023-07-24 13:11:30 +05:30
parent 2d5c1e205d
commit 87051edf55
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -18,6 +18,7 @@ import (
"kitty"
"kitty/tools/cli/markup"
"kitty/tools/rsync"
"kitty/tools/tty"
"kitty/tools/tui"
"kitty/tools/tui/loop"
"kitty/tools/utils"
@ -385,6 +386,8 @@ type handler struct {
last_data_write_id loop.IdType
}
var debugprintln = tty.DebugPrintln
func (self *manager) send(c FileTransmissionCommand, send func(string) loop.IdType) loop.IdType {
send(self.prefix)
send(c.Serialize(false))
@ -989,7 +992,7 @@ func receive_loop(opts *Options, spec []string, dest string) (err error, rc int)
for i := range spec {
handler.manager.spec_counts[i] = 0
}
handler.manager.prefix = fmt.Sprintf("\x1b]{%d};id=%s;", kitty.FileTransferCode, handler.manager.request_id)
handler.manager.prefix = fmt.Sprintf("\x1b]%d;id=%s;", kitty.FileTransferCode, handler.manager.request_id)
if handler.manager.bypass != `` {
if handler.manager.bypass, err = encode_bypass(handler.manager.request_id, handler.manager.bypass); err != nil {
return err, 1