cannot open file from directory having particularly punctuated name

Bug #571293 reported by Frank Rudzicz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
Medium
gvfs (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: evince

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". This appears to be similar to, but different than, bug #112125.

This is occurring in Lucid 10.04 release candidate, but occurred in 9.10 as well.

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`
3) Ah! There you are!

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: evince 2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Wed Apr 28 11:01:38 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_CA.utf8
 SHELL=/bin/bash
SourcePackage: evince

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

reproduced as described, investigating.
$ uname -a
Linux tallguy 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

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.

Changed in evince (Ubuntu):
status: New → Confirmed
tags: removed: amd64
Revision history for this message
Pedro Villavicencio (pedro) wrote :

seems to come from gvfs, let's assign it there for now, i'll send the report upstream as well, thanks.

affects: evince (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
importance: Undecided → Low
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at:
 https://bugzilla.gnome.org/show_bug.cgi?id=619668

Changed in gvfs (Ubuntu):
status: Confirmed → Triaged
Changed in gvfs:
status: Unknown → New
Changed in gvfs:
importance: Unknown → Medium
Changed in gvfs:
status: New → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

The bug should be fixed in the current version, closing, feel free to reopen/open a new ticket if you still have issues though

Changed in gvfs (Ubuntu):
status: Triaged → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.