Skip to content

Commit

Permalink
Fix setting platform options via configuration file
Browse files Browse the repository at this point in the history
Make sure shell config-file parameter is set before setting up platform
because it is used by the paltform to read the initial options.
  • Loading branch information
J-Bu committed Aug 6, 2024
1 parent 9ac900a commit 1f291c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions launcher/cog-launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ cog_launcher_startup(GApplication *application)
#endif /* COG_HAVE_MEM_PRESSURE */
NULL);

if (s_options.key_file) {
g_autoptr(GKeyFile) key_file = g_steal_pointer(&s_options.key_file);
g_object_set(self->shell, "config-file", key_file, NULL);
}

g_autoptr(GError) error = NULL;
if (!cog_platform_setup(cog_platform_get(), self->shell, s_options.platform_params, &error))
g_error("Cannot configure platform: %s", error->message);
Expand Down Expand Up @@ -324,11 +329,6 @@ cog_launcher_startup(GApplication *application)
g_clear_pointer(&s_options.handler_map, g_hash_table_destroy);
}

if (s_options.key_file) {
g_autoptr(GKeyFile) key_file = g_steal_pointer(&s_options.key_file);
g_object_set(self->shell, "config-file", key_file, NULL);
}

#if COG_USE_WPE2
if (!self->automated) {
webkit_network_session_set_tls_errors_policy(self->network_session,
Expand Down

0 comments on commit 1f291c1

Please sign in to comment.