1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-25 06:03:40 +03:00

xdg-autostart-generator: do not warn about unknown fields

My user manager says:
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.gnome.Terminal.desktop:256: Unknown key name 'Actions' in section 'Desktop Entry', ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.gnome.Terminal.desktop:258: Unknown section 'Desktop Action new-window'. Ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.gnome.Terminal.desktop:343: Unknown section 'Desktop Action preferences'. Ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop:12: Unknown key name 'Actions' in section 'Desktop Entry', ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop:13: Unknown key name 'SingleMainWindow' in section 'Desktop Entry', ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop:19: Unknown section 'Desktop Action Quit'. Ignoring.

This is not useful. Those are externally-provided files, and they are likely to
have entries which we know nothing about.

(cherry picked from commit b5a70eeecdb593f8498c0bc163d5a12297cfb55d)
(cherry picked from commit 90ba721560b67e329fff4f2c4e59f5c578d8f440)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-03-24 17:51:52 +01:00
parent cd3d4ab738
commit c71bd9c535

View File

@ -350,7 +350,8 @@ XdgAutostartService *xdg_autostart_service_parse_desktop(const char *path) {
r = config_parse(NULL, service->path, NULL,
"Desktop Entry\0",
xdg_config_item_table_lookup, items,
CONFIG_PARSE_WARN, service,
CONFIG_PARSE_RELAXED | CONFIG_PARSE_WARN,
service,
NULL);
/* If parsing failed, only hide the file so it will still mask others. */
if (r < 0) {