After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619668 - cannot open file from directory having particularly punctuated name
cannot open file from directory having particularly punctuated name
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
1.6.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-25 20:48 UTC by Pedro Villavicencio
Modified: 2013-11-02 06:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30



Description Pedro Villavicencio 2010-05-25 20:48:56 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/gvfs/+bug/571293

"When attempting to open a pdf in evince 2.30.0 from a directory having a particularly punctuated name (e.g., with colons ':'), the pdf is not opened and evince returns the error message "Unable to open document: The specified location is not supported". "

"Steps to recreate:

1) On the command line, create a directory with a colon in the name (e.g., `mkdir ~/Desktop/fu\:bar`)
2) Copy a pdf into that directory (e.g., `cp trololo.pdf ~/Desktop/fu\:bar/`)
3) Attempt to open the pdf from *outside* that directory (e.g., `evince ~/Desktop/fu\:bar/trololo.pdf`)
4) See the error message, but not your document

However, if you change directory to the nefarious directory and open from there, the problem goes away:

1) e.g., `cd ~/Desktop/fu\:bar`
2) `evince trololo.pdf`
"

"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."

Thanks,
Comment 1 Felix Möller 2012-08-01 22:53:32 UTC
Thanks for your detailed reproduction steps!

I cannot reproduce this with 1.12.1.

Can anybody still reproduce?
Comment 2 Ross Lagerwall 2013-11-02 06:11:51 UTC
Seems to have been fixed since the bug report. Thanks.