Do not strip spaces at the end of file names of dropped files on linuxbsd

This commit is contained in:
Markus Sauermann 2022-10-21 01:40:32 +02:00
parent 889868cbbc
commit 5d0aade322
1 changed files with 2 additions and 2 deletions

View File

@ -4113,10 +4113,10 @@ void DisplayServerX11::process_events() {
if (event.xselection.target == requested) { if (event.xselection.target == requested) {
Property p = _read_property(x11_display, windows[window_id].x11_window, XInternAtom(x11_display, "PRIMARY", 0)); Property p = _read_property(x11_display, windows[window_id].x11_window, XInternAtom(x11_display, "PRIMARY", 0));
Vector<String> files = String((char *)p.data).split("\n", false); Vector<String> files = String((char *)p.data).split("\r\n", false);
XFree(p.data); XFree(p.data);
for (int i = 0; i < files.size(); i++) { for (int i = 0; i < files.size(); i++) {
files.write[i] = files[i].replace("file://", "").uri_decode().strip_edges(); files.write[i] = files[i].replace("file://", "").uri_decode();
} }
if (!windows[window_id].drop_files_callback.is_null()) { if (!windows[window_id].drop_files_callback.is_null()) {