[Portland-bugs] [Bug 15661] New: xdg-open breaks on spaces in paths when using generic open method
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Apr 22 15:39:34 PDT 2008
http://bugs.freedesktop.org/show_bug.cgi?id=15661
Summary: xdg-open breaks on spaces in paths when using generic
open method
Product: Portland
Version: unspecified
Platform: All
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: low
Component: xdg-utils
AssignedTo: portland-bugs at lists.freedesktop.org
ReportedBy: jpcc at bigfoot.com
xdg-utils 1.0.1-2 on Ubuntu Gutsy 7.10
xdg-open tries to detect the desktop environment and falls back to a generic
method using run-mailcap. There is a bug in this function open_generic() that
means if the path contains a space, the method fails.
e.g.
johncc at liberator:~$ xdg-open Fire\ stockists.txt
local: 438: stockists.txt: bad variable name
Warning: unknown mime-type for "Fire" -- using "application/*"
Error: no such file "Fire"
To provoke this bug you need to not be running GNOME, KDE or XFCE. In GNOME
you can fake this by doing:-
unset GNOME_DESKTOP_SESSION_ID
touch file\ with\ spaces.txt
xdg-open file\ with\ spaces.txt
The problem is just missing quotes. A simple patch fixes it for me.
373c373
< local file="$(echo "$1" | sed 's%^file://%%')"
---
> local file=$(echo "$1" | sed 's%^file://%%')
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Portland-bugs
mailing list