From fa9aad2e09435da2ef901e333fa7afd54cc0e5e6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 5 Aug 2018 10:41:23 -0400 Subject: [PATCH] Warn when skipping installations When we fail to parse an installation, emit some warnings that give the user a chance to figure out what is going wrong. I ran into the missing quotes issue myself when I first tried to create a custom installation. Closes: #1939 Approved by: alexlarsson --- common/flatpak-dir.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 02b2ad23..ebf43eb8 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -704,11 +704,18 @@ append_locations_from_config_file (GPtrArray *locations, size_t len; if (!g_str_has_prefix (groups[i], "Installation \"")) - continue; + { + if (g_str_has_prefix (groups[i], "Installation ")) + g_warning ("Installation without quotes (%s). Ignoring", groups[i]); + continue; + } id = g_strdup (&groups[i][14]); if (!g_str_has_suffix (id, "\"")) - continue; + { + g_warning ("Installation without closing quote (%s). Ignoring", groups[i]); + continue; + } len = strlen (id); if (len > 0)