xdg-open fails with spaces in filename

Bug #683189 reported by marcog
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
xdg-utils (Debian)
Fix Released
Unknown
xdg-utils (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Invalid
Undecided
Unassigned
Maverick
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: xdg-utils

$ ls a\ b.pdf
a b.pdf
$ xdg-open a\ b.pdf

The above results in an attempt to open file "a" and file "b.pdf" with evince, when one would expect it to open "a b.pdf" with evince.

This is on Ubuntu 10.10.

$ apt-cache policy xdg-utils
xdg-utils:
  Installed: 1.0.2+cvs20100307-1
  Candidate: 1.0.2+cvs20100307-1
  Version table:
 *** 1.0.2+cvs20100307-1 0
        500 http://ftp.leg.uct.ac.za/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: xdg-utils 1.0.2+cvs20100307-1
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Nov 30 17:45:23 2010
Dependencies:

PackageArchitecture: all
ProcEnviron:
 LANG=en_ZA.utf8
 SHELL=/bin/bash
SourcePackage: xdg-utils

Revision history for this message
marcog (marco-gallotta) wrote :

Changing line 398 from

$command_exec $1

to

$command_exec "$1"

appears to fix the problem.

Revision history for this message
DH (dave-higherform) wrote :

I can confirm that this bug is present on fully up to date Ubuntu Maverick with xdg-utils 1.0.2+cvs20100307-1ubuntu0.1 .

Revision history for this message
Amine Brikci-N (nh2amine) wrote :

I've got the same bug on my fully up to date lubuntu 10.10 and it causes chromium to bug when opening pdf files with spaces in their name.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Fixed in 1.0.2+cvs20100307-3 which is in natty.

Changed in xdg-utils (Ubuntu):
status: New → Fix Released
Changed in xdg-utils (Debian):
status: Unknown → Fix Released
Changed in xdg-utils (Ubuntu Lucid):
status: New → Invalid
Changed in xdg-utils (Ubuntu Maverick):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Stefano Rivera (stefanor) wrote :

SRU Testcase:
1. Find/Create a file with a space in its name.
2. xdg-open "filename"
3. Either it opens or it fails :)

Changed in xdg-utils (Ubuntu Maverick):
importance: Low → Medium
Revision history for this message
Benjamin Drung (bdrung) wrote :

uploaded xdg-utils 1.0.2+cvs20100307-1ubuntu0.2 to maverick-proposed

Changed in xdg-utils (Ubuntu Maverick):
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted xdg-utils into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Amine Brikci-N (nh2amine) wrote :

Cool! I just updated xdg-utils and the bug is finally fixed!
Thank you.

Changed in xdg-utils (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

setting back to 'fix committed' because the fix is not in -updates yet.

Changed in xdg-utils (Ubuntu Maverick):
status: Fix Released → Fix Committed
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-utils - 1.0.2+cvs20100307-1ubuntu0.2

---------------
xdg-utils (1.0.2+cvs20100307-1ubuntu0.2) maverick-proposed; urgency=low

  * xdg-open-spaces.diff: Support paths with spaces in
    open_generic_xdg_mime(). (LP: #683189)
 -- Stefano Rivera <email address hidden> Tue, 25 Jan 2011 16:11:47 +0100

Changed in xdg-utils (Ubuntu Maverick):
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.