xfce4-appfinder doesn't handle escaping in desktop file

Bug #1393212 reported by Aleks Krsch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xfce4 Application Finder
Confirmed
Low
xfce4-appfinder (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Example of an error message:
Working directory "/home/krsch/hdd/games/The\sLast\sFedaration/game" does not exist. It won't be used when spawning "/home/krsch/hdd/games/The\sLast\sFedaration/game/LastFederationLinux.x86_64".xfce4-appfinder: failed to execute: Failed to execute child process "/home/krsch/hdd/games/The\sLast\sFedaration/game/LastFederationLinux.x86_64" (No such file or directory)

File "/home/krsch/hdd/games/The Last Fedaration/game/LastFederationLinux.x86_64" does exist and is executable.

As mentioned in http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s03.html , escape sequence \s should be treated as a space in string fields. Unfortunately. xfce4-appfinder ignores this rule.

I use Ubuntu 14.04.1 LTS and xfce4-appfinder 4.10.1-1

The desktop file that triggered the above error is:
[Desktop Entry]
Type=Application
Name=The Last Fedaration
Comment=The Last Fedaration (GOG.com)
Icon=/home/krsch/hdd/games/The\sLast\sFedaration/support/gog-the-last-fedaration.png
Exec="/home/krsch/hdd/games/The\sLast\sFedaration/game/LastFederationLinux.x86_64"
Categories=Game;
Terminal=false
Path=/home/krsch/hdd/games/The\sLast\sFedaration/game

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/Xfce. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Revision history for this message
In , Aleks Krsch (akrsch) wrote :

Example of an error message:
 Working directory "/home/krsch/hdd/games/The\sLast\sFedaration/game" does not exist. It won't be used when spawning "/home/krsch/hdd/games/The\sLast\sFedaration/game/LastFederationLinux.x86_64".xfce4-appfinder: failed to execute: Failed to execute child process "/home/krsch/hdd/games/The\sLast\sFedaration/game/LastFederationLinux.x86_64" (No such file or directory)

File "/home/krsch/hdd/games/The Last Fedaration/game/LastFederationLinux.x86_64" does exist and is executable.

As mentioned in http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s03.html , escape sequence \s should be treated as a space in string fields. Unfortunately. xfce4-appfinder ignores this rule.

I use Ubuntu 14.04.1 LTS and xfce4-appfinder 4.10.1-1

The desktop file that triggered the above error is:
 [Desktop Entry]
 Type=Application
 Name=The Last Fedaration
 Comment=The Last Fedaration (GOG.com)
 Icon=/home/krsch/hdd/games/The\sLast\sFedaration/support/gog-the-last-fedaration.png
 Exec="/home/krsch/hdd/games/The\sLast\sFedaration/game/LastFederationLinux.x86_64"
 Categories=Game;
 Terminal=false

Revision history for this message
Aleks Krsch (akrsch) wrote :
Changed in xfce4-appfinder:
importance: Unknown → Low
status: Unknown → Confirmed
affects: xfce4-appfinder (Ubuntu) → exo (Ubuntu)
affects: xfce4-appfinder → exo
Revision history for this message
In , Bluesabre-1 (bluesabre-1) wrote :

Reassigning to xfce4-appfinder.

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Created attachment 8240
escape.diff

@bluesabre, the attached unescapes the \s sequence, but I'm not sure this is the best approach (it does not handle \n, \t, \r, and \\). I also tried g_strcompress but it didn't work as I expected.

xfce_appfinder_model_execute is similar to garcon_gtk_menu_item_activate_real, but the latter also does not deal with escaped sequences.

So I think garcon could provide the something like garcon_menu_item_get_escaped_command so both functions would benefit.

Revision history for this message
Sean Davis (bluesabre) wrote :

Reassigning to xfce4-appfinder per upstream.

affects: exo → xfce4-appfinder
affects: exo (Ubuntu) → xfce4-appfinder (Ubuntu)
Revision history for this message
Sean Davis (bluesabre) wrote :
Changed in xfce4-appfinder (Ubuntu):
status: New → Confirmed
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.