Commit 2e1fed1b authored by Christian Hergert's avatar Christian Hergert

flatpak: ensure dirty bit is not changed after creation

By validating properties and changing state, we lost our FALSE state for
the dirty bit in the configuration. That resulted in write-back of the
configuration in situations where we don't want to do that.
parent e94a2170
......@@ -327,6 +327,8 @@ gbp_flatpak_configuration_provider_load_worker (IdeTask *task,
continue;
}
g_assert (ide_configuration_get_dirty (IDE_CONFIGURATION (manifest)) == FALSE);
g_signal_connect_object (manifest,
"needs-reload",
G_CALLBACK (manifest_needs_reload),
......@@ -551,6 +553,7 @@ gbp_flatpak_configuration_provider_load_finish (IdeConfigurationProvider *provi
IdeConfiguration *config = g_ptr_array_index (configs, i);
g_assert (IDE_IS_CONFIGURATION (config));
g_assert (ide_configuration_get_dirty (config) == FALSE);
ide_configuration_provider_emit_added (provider, config);
}
......
......@@ -457,9 +457,12 @@ gbp_flatpak_manifest_initable_init (GInitable *initable,
self->root = json_node_ref (root);
self->primary = json_object_ref (primary);
if (!validate_properties (self, error))
return FALSE;
ide_configuration_set_dirty (IDE_CONFIGURATION (self), FALSE);
return validate_properties (self, error);
return TRUE;
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment