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. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=376579 "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 [works] dpt@amaryllis:/tmp$ mv t.ps t\:t.ps dpt@amaryllis:/tmp$ evince t\:t.ps [Gives error: Unable to open document Unsupported operation] dpt@amaryllis:/tmp$ evince /tmp/t\:t.ps [works]"
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] Proposed patch 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).
Commited.
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: https://gitlab.gnome.org/Archive/gnome-vfs/commits/master 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!