macOS requires URLs to directories to end with a slash
This commit is contained in:
parent
5669df4022
commit
a1b1b89feb
2 changed files with 5 additions and 1 deletions
|
|
@ -387,7 +387,8 @@ Dragging to remote machines
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
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
|
||||
``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
|
||||
|
|
|
|||
|
|
@ -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, "/") {
|
||||
upath = "/" + upath
|
||||
}
|
||||
if st.IsDir() && !strings.HasSuffix(upath, "/") {
|
||||
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})
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue