After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 343632 - Fails to handle %% escape correctly in .desktop files
Fails to handle %% escape correctly in .desktop files
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-01 22:12 UTC by Josselin Mouette
Modified: 2006-06-20 08:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed fix for 2.14 (268 bytes, patch)
2006-06-06 12:40 UTC, Josselin Mouette
none Details | Review

Description Josselin Mouette 2006-06-01 22:12:58 UTC
[ forwarded from http://bugs.debian.org/369812 ]

According to the .desktop file specification, the combination '%%' in the
Exec line in a .desktop file should yield one '%' in the result.
libgnomevfs2 doesn't do this, but instead yields the empty string.
Comment 1 Sebastien Bacher 2006-06-02 08:28:04 UTC
Thanks for your bug. Do you have a simple example exhibing that behaviour?
Comment 2 Josselin Mouette 2006-06-06 09:21:50 UTC
For example, if a .desktop file associated with some extension contains:
Exec=touch /tmp/pouet_%%
it does not touch /tmp/pouet_% but it does touch the file you double-click on, which is strictly equivalent to:
Exec=touch
Comment 3 Josselin Mouette 2006-06-06 12:02:06 UTC
Quoting the original reporter:

AFAICS, the handling of mime types is done in
libgnomevfs/gnome-vfs-mime-handlers.c, in the function expand_macro,
starting at line 1449. Inspecting the code shows that %% is ignored there,
instead of converted to %
Comment 4 Josselin Mouette 2006-06-06 12:40:18 UTC
Created attachment 66821 [details] [review]
Proposed fix for 2.14
Comment 5 Alexander Larsson 2006-06-20 08:46:17 UTC
Commited to HEAD. Thanks.