mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
More work on transfer kitten
This commit is contained in:
@@ -44,9 +44,6 @@ func read_bypass(loc string) (string, error) {
|
||||
}
|
||||
|
||||
func main(cmd *cli.Command, opts *Options, args []string) (rc int, err error) {
|
||||
if err != nil {
|
||||
rc = 1
|
||||
}
|
||||
if opts.PermissionsBypass != "" {
|
||||
val, err := read_bypass(opts.PermissionsBypass)
|
||||
if err != nil {
|
||||
@@ -54,6 +51,17 @@ func main(cmd *cli.Command, opts *Options, args []string) (rc int, err error) {
|
||||
}
|
||||
opts.PermissionsBypass = strings.TrimSpace(val)
|
||||
}
|
||||
if len(args) == 0 {
|
||||
return 1, fmt.Errorf("Must specify at least one file to transfer")
|
||||
}
|
||||
if opts.Direction == "send" {
|
||||
err = send_main(opts, args)
|
||||
} else {
|
||||
err = receive_main(opts, args)
|
||||
}
|
||||
if err != nil {
|
||||
rc = 1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user