From 23e7fd3a607c9c2a5cceb18a4b43ffb887f30f88 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Tue, 29 Jun 2021 14:43:16 +0200 Subject: [PATCH] manager: Don't use peas_engine_prepend_search_path as it does not really "prepend" the search path. See https://gitlab.gnome.org/GNOME/libpeas/-/issues/19 Closes #300 --- src/calls-manager.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/calls-manager.c b/src/calls-manager.c index 4e42d4f..e3002a0 100644 --- a/src/calls-manager.c +++ b/src/calls-manager.c @@ -703,17 +703,19 @@ calls_manager_init (CallsManager *self) self->contacts_provider, "country-code", G_BINDING_DEFAULT); - // Prepend peas plugin search path peas = peas_engine_get_default (); - peas_engine_add_search_path (peas, PLUGIN_LIBDIR, NULL); - g_debug ("Scanning for plugins in `%s'", PLUGIN_LIBDIR); dir = g_getenv ("CALLS_PLUGIN_DIR"); if (dir && dir[0] != '\0') { + /** Add the directory to the search path. prepend_search_path() does not work + * as expected. see https://gitlab.gnome.org/GNOME/libpeas/-/issues/19 + */ g_debug ("Adding %s to plugin search path", dir); - peas_engine_prepend_search_path (peas, dir, NULL); + peas_engine_add_search_path (peas, dir, NULL); } + peas_engine_add_search_path (peas, PLUGIN_LIBDIR, NULL); + g_debug ("Scanning for plugins in `%s'", PLUGIN_LIBDIR); }