GNOME Bugzilla – Bug 374341
Won't load files with relative path and : in name
Last modified: 2018-08-17 13:53:29 UTC
This bug was reported to the Debian BTS.
"There seems to be some problems with the quoting with files that have
colons in the name. Here's a transcript showing the problem.
dpt@amaryllis:/tmp$ evince t.ps
dpt@amaryllis:/tmp$ mv t.ps t\:t.ps
dpt@amaryllis:/tmp$ evince t\:t.ps
Unable to open document
dpt@amaryllis:/tmp$ evince /tmp/t\:t.ps
I think this clashes with URL support.
It's a gnome-vfs bug, gnome_vfs_make_uri_from_shell_arg() doesn't return a valid uri when filename is a relative path and contains ':'. Reassigning.
Created attachment 83891 [details] [review]
Thanks for your bug report and your analysis.
gnome_vfs_make_uri_from_shell_arg() indeed treats all file names containing a ':' character that is only preceeded by letters (and other characters that are accepted as scheme specifier in the URI RFC) as a raw URI.
The attached patch changes the algorithm to only match against schemes that have an associated method, i.e. we're expected to be able to deal with. This will not resolve the issue for file names like "file:" or "ftp:" but it should be a progress. I didn't want to stat the passed-in file name, as I don't think this helper is meant to do any data-related I/O (besides the added method lookup which might kick off I/O as well).
I had to revert that patch to fix bug #417595. We must not break gnome-vfs uri support for methods that we don't handle with a gnome-vfs method since we don't know if apps are using GnomeVFSUri for their special uris (i.e. yelp does).
gnome-vfs got deprecated in 2008.
gnome-vfs is not under active development anymore and had its last code changes
in 2011. Its codebase has been archived:
gio (in glib) and gvfs are its successors. See https://developer.gnome.org/gio/stable/ch33.html and https://people.gnome.org/~gicmo/gio-migration-guide/ for porting info.
Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of glib/gio/gvfs. Thanks!