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 676277 - Document that g_app_info_create_from_commandline() does unquoting according to fd.o
Document that g_app_info_create_from_commandline() does unquoting according t...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-05-17 20:27 UTC by Holger Berndt
Modified: 2012-05-26 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Document that g_app_info_create_from_commandline() does unquoting according to fd.o (972 bytes, patch)
2012-05-17 20:27 UTC, Holger Berndt
committed Details | Review

Description Holger Berndt 2012-05-17 20:27:21 UTC
g_app_info_create_from_commandline()'s commandline argument is effectively
processed like a .desktop Exec key field.

It took me a while to figure out why '%' characters got stripped from
my commandline argument, so I propose this documentation enhancement.
Comment 1 Holger Berndt 2012-05-17 20:27:23 UTC
Created attachment 214279 [details] [review]
Document that g_app_info_create_from_commandline() does unquoting according to fd.o
Comment 2 Matthias Clasen 2012-05-18 12:45:44 UTC
Review of attachment 214279 [details] [review]:

Sure, looks good. What would make this even better is an example of what this means in practice.
Comment 3 Holger Berndt 2012-05-18 13:39:13 UTC
Pushed an ammended version of the patch that mentions percent-encoded URIs as
an example of a potential pitfall.

Thanks for the quick response!
Attachment 214279 [details] pushed as 0e6d9df - Document that g_app_info_create_from_commandline() does unquoting according to fd.o
Comment 4 Holger Berndt 2012-05-26 15:07:02 UTC
Thinking about it, I wonder if it'd be worth having a convenience function that does Exec key quoting in glib (analogous to e.g. g_shell_quote()), because any application that uses g_app_info_create_from_commandline() seems likely to need it anyways. I could provide a patch if that API was wanted.