GNOME Bugzilla – Bug 619668
cannot open file from directory having particularly punctuated name
Last modified: 2013-11-02 06:11:51 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,
Thanks for your detailed reproduction steps! I cannot reproduce this with 1.12.1. Can anybody still reproduce?
Seems to have been fixed since the bug report. Thanks.