summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-05-25 22:01:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-05-25 22:02:15 (GMT)
commiteef3392134b489fbff7c96046581c987ff7192bd (patch)
treed9926feb13b8a5008cc0013e7ad0a5adb9c73637 /src/plugins
parent2d16cca046ff80f2be3eea6934dd1dd8f4b807d1 (diff)
Provided a way to relocate built binaries.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/pglist.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/pglist.c b/src/plugins/pglist.c
index 97fc931..cb366fe 100644
--- a/src/plugins/pglist.c
+++ b/src/plugins/pglist.c
@@ -37,6 +37,7 @@
#include "plugin-int.h"
#include "../common/extstr.h"
+#include "../core/paths.h"
@@ -73,12 +74,18 @@ static void on_plugin_ref_toggle(gpointer, GPluginModule *, gboolean);
bool init_all_plugins(bool load)
{
+#ifdef DISCARD_LOCAL
+ char *edir; /* RĂ©pertoire de base effectif */
+#endif
+
g_rw_lock_init(&_pg_lock);
#ifndef DISCARD_LOCAL
browse_directory_for_plugins(PACKAGE_SOURCE_DIR "/plugins");
#else
- browse_directory_for_plugins(PLUGINS_LIB_DIR);
+ edir = get_effective_directory(PLUGINS_LIB_DIR);
+ browse_directory_for_plugins(edir);
+ free(edir);
#endif
if (load)