g_app_info_get_default_for_uri_scheme broken for URIs on win32
How to reproduce
On Windows 10 1903, glib 2.62.4 (msys2) open the Links demo from gtk3-demo and click on any of the links.
What happens
Links don't open
(gtk3-demo.exe:6564): Gtk-WARNING **: 21:39:36.039: Unable to show 'http://en.wikipedia.org/wiki/Text': No application is registered as handling this file
appears in console.
If I red the code correctly, glib tries to figure out the user's choice for opening http
URIs by looking at HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http
. As far as I can tell from the screenshot the entries seem to be encrypted/obfuscated to prevent applications from messing with file associations in nefarious ways.
Silly question, but why don't we short-circuit gtk_show_uri_on_window
or some other place in the stack to ShellExecute
on win32 instead of trying to reimplement it?