Comment 7 for bug 291847

Revision history for this message
Chris Jones (cmsj) wrote :

xdg-open is a very simple shell script which appears to do nothing to modify the URL parameter before passing it to the chosen desktop handler (so gnome-open for Ubuntu). Indeed, running:

gnome-open mailto:<email address hidden>

will produce the same prefixed ///

(xdg-email also calls gnome-open)

gnome-open is even shorter than xdg-open, albeit in C. It appears to be doing the canonicalisation with calls to GIO.

It seems as though passing a mailto: URI to a GIO function that creates a GFile (e.g. g_file_new_for_commandline_arg() which gnome-open uses) "may be slightly destructive", to quote GIO's ChangeLog.
On the (admittedly somewhat arbitrary and potentially spurious) basis that something called GFile has no business dealing with things that aren't files, I've attached a naive patch to make gnome-open not feed mailto URIs through GFile.