mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
macOS requires URLs to directories to end with a slash
This commit is contained in:
@@ -387,7 +387,8 @@ Dragging to remote machines
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
To support dragging to remote machines, first of all clients **must** pre-send
|
To support dragging to remote machines, first of all clients **must** pre-send
|
||||||
the data for the ``text/uri-list`` MIME type. Then, terminals can
|
the data for the ``text/uri-list`` MIME type. All ``file://`` URLs that point
|
||||||
|
to directories **must** end with a ``/``. Then, terminals can
|
||||||
examine the :ref:`machine_id` sent with the enable drag offers
|
examine the :ref:`machine_id` sent with the enable drag offers
|
||||||
``t=o`` escape code to decide whether to request data for ``file://`` entries
|
``t=o`` escape code to decide whether to request data for ``file://`` entries
|
||||||
from the URI list. To request data for a particular entry, terminals send an
|
from the URI list. To request data for a particular entry, terminals send an
|
||||||
|
|||||||
@@ -395,6 +395,9 @@ func dnd_main(cmd *cli.Command, opts *Options, args []string) (rc int, err error
|
|||||||
if runtime.GOOS == "windows" && !strings.HasPrefix(upath, "/") {
|
if runtime.GOOS == "windows" && !strings.HasPrefix(upath, "/") {
|
||||||
upath = "/" + upath
|
upath = "/" + upath
|
||||||
}
|
}
|
||||||
|
if st.IsDir() && !strings.HasSuffix(upath, "/") {
|
||||||
|
upath += "/"
|
||||||
|
}
|
||||||
u := &url.URL{Scheme: "file", Path: upath}
|
u := &url.URL{Scheme: "file", Path: upath}
|
||||||
uri_list = append(uri_list, uri_list_item{path: path, uri: u.String(), human_name: arg, metadata: st})
|
uri_list = append(uri_list, uri_list_item{path: path, uri: u.String(), human_name: arg, metadata: st})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user