text/uri-list is handled incorrectly on MacOS > 10.14
Steps to reproduce
- In GIMP 2.99.18, open the file chooser dialog box
- Drag an image to the GIMP canvas (and drop)
- The operation fails because the
file:///
url ends in%0D%0A
Current behavior
Expected outcome
The file URI should not have \r\n
URL encoded onto the end.
Version information
3.24.38
Additional information
It looks like in gtkquartz.c
the type returned from gdk_quartz_atom_to_pasteboard_type_libgtk_only
and used in _gtk_quartz_set_selection_data_for_pasteboard
should be NSURLPboardType
so that the text/uri-list
can be properly parsed, but instead, in 10.15+, the type returned is NSPasteboardTypeURL
because in gdkselection-quartz.c
on line 177 there is an #if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
that directs a different result.
I don't understand what the code is trying to do well enough to patch this issue.