mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-15 04:48:29 +01:00
As per the desktop entry specification, the `%k` field code should be expanded to the location of the desktop entry file being processed. This is only possible if the constructor-only filename property is populated, which does not happen when using g_desktop_app_info_new_from_keyfile(). Moreover, since the Path directive in a desktop entry can be used to set the working directory for the program to be launched, the location passed as argument to the program must be modified such that it points at the correct file when interpreted by the launched program. The simplest way to achieve this consistently is to pass an absolute path. However, g_desktop_app_info_new_from_keyfile() does not indicate why it fails when it does. Because the tool aims to indicate whether launching failed due to a missing file or a malformed one we first check this with g_key_file_load_from_file().
3.9 KiB
3.9 KiB