mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-06 22:11:32 -05:00
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
This commit is contained in:
committed by
Atomic Bot
parent
7a9a9b64d0
commit
fa9aad2e09
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user