Comment 3 for bug 571293

Revision history for this message
matt.wartell (matt-wartell+lp) wrote :

I have traced the error into the g_file_new_for_commandline_arg() function in of libgio.2.0
http://library.gnome.org/devel/gio/unstable/GFile.html#g-file-new-for-commandline-arg
This bug is not particular to evince, but to any caller of that function.

It is not clear that this is an defect per se, but results from trying to interpret "fu:" as a URI schema *only* when it is the starting characters of the pathname.

The workaround is simple: evince ./fu:bar/trololo.pdf works fine as the path does not being "[a-zA-Z]+:"

It seems like fixing libgio for this slightly pathological case would remove a reasonable amount of utility for opening non-local URIs. Indeed, the documentation for g_file_new_for_commandline_arg() states:

"The value of arg can be either a URI, an absolute path or a relative path resolved relative to the current working directory. This operation never fails, but the returned object might not support any I/O operation if arg points to a malformed path."

The only open question is whether "fu:bar/file" is a malformed path.