Also handle leading ~
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run

This commit is contained in:
Kovid Goyal 2026-07-08 17:27:22 +05:30
parent 43e0e52b79
commit e6c657eb35
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -8,6 +8,7 @@ import (
"path/filepath"
"github.com/emmansun/base64"
"github.com/kovidgoyal/kitty/tools/utils"
)
func screenshot_handle_response(data []byte) error {
@ -33,7 +34,7 @@ func read_screenshot_args(io_data *rc_io_data, args []string) (func(io_data *rc_
// io_data.rc.Payload is only populated after this generator is created,
// so the payload field must be set here rather than above.
if len(args) == 1 {
path, err := filepath.Abs(args[0])
path, err := filepath.Abs(utils.Expanduser(args[0]))
if err != nil {
return false, fmt.Errorf("%s is not a valid path with error: %w", args[0], err)
}