! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-appfinder doesn't handle escaping in desktop file
Status:
RESOLVED: MOVED
Product:
Xfce4-appfinder
Component:
General

Comments

Description Alexey Kreshchuk 2014-11-19 20:49:50 CET
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
Comment 1 Sean Davis editbugs 2019-01-11 02:30:32 CET
Reassigning to xfce4-appfinder.
Comment 2 Andre Miranda editbugs 2019-01-13 18:06:33 CET
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.
Comment 3 Git Bot editbugs 2020-05-26 00:55:26 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-appfinder/-/issues/8.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #11315

Reported by:
Alexey Kreshchuk
Reported on: 2014-11-19
Last modified on: 2020-05-26

People

Assignee:
Nick Schermer
CC List:
4 users

Version

Version:
Unspecified

Attachments

escape.diff (629 bytes, patch)
2019-01-13 18:06 CET , Andre Miranda
no flags

Additional information